Author SHA1 Message Date
Renovate Bot 05af33e247 Add renovate.json 2020-11-04 09:14:27 +00:00
24 changed files with 9114 additions and 4689 deletions

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
dist
typings
+12
View File
@@ -0,0 +1,12 @@
{
"root": true,
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"extends": ["@antfu/eslint-config-ts"],
"plugins": ["jest"],
"rules": {}
}
-1
View File
@@ -1 +0,0 @@
github: [antfu]
-87
View File
@@ -1,87 +0,0 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Lint
run: nr lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Typecheck
run: nr typecheck
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Build
run: nr build
- name: Test
run: nr test
-29
View File
@@ -1,29 +0,0 @@
name: Release
permissions:
contents: write
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+24
View File
@@ -0,0 +1,24 @@
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Install
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm test
+80 -10
View File
@@ -1,11 +1,81 @@
.cache # Created by .ignore support plugin (hsz.mobi)
.DS_Store ### Node template
.idea # Logs
*.log
*.tgz
coverage
dist
lib-cov
logs logs
node_modules *.log
temp npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE
.idea
-1
View File
@@ -1 +0,0 @@
ignore-workspace-root-check=true
-41
View File
@@ -1,41 +0,0 @@
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "never"
},
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
}
-1
View File
@@ -1 +0,0 @@
Please refer to https://github.com/antfu/contribute
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2022 Anthony Fu <https://github.com/antfu> Copyright (c) 2020 Anthony Fu <https://github.com/antfu>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
+1 -38
View File
@@ -1,38 +1 @@
# pkg-placeholder # ts-starter
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]
_description_
> **Note**:
> Replace `pkg-placeholder`, `_description_` and `antfu` globally to use this template.
## Sponsors
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
</a>
</p>
## License
[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)
<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/pkg-placeholder
[npm-downloads-src]: https://img.shields.io/npm/dm/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/pkg-placeholder
[bundle-src]: https://img.shields.io/bundlephobia/minzip/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=pkg-placeholder
[license-src]: https://img.shields.io/github/license/antfu/pkg-placeholder.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/antfu/pkg-placeholder/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
[jsdocs-href]: https://www.jsdocs.io/package/pkg-placeholder
-12
View File
@@ -1,12 +0,0 @@
import { defineBuildConfig } from 'unbuild'
export default defineBuildConfig({
entries: [
'src/index',
],
declaration: true,
clean: true,
rollup: {
emitCJS: true,
},
})
-15
View File
@@ -1,15 +0,0 @@
// @ts-check
import antfu from '@antfu/eslint-config'
export default antfu(
{
ignores: [
// eslint ignore globs here
],
},
{
rules: {
// overrides
},
},
)
+12
View File
@@ -0,0 +1,12 @@
module.exports = {
roots: [
'<rootDir>/test',
],
testMatch: [
'**/__tests__/**/*.+(ts|tsx|js)',
'**/?(*.)+(spec|test).+(ts|tsx|js)',
],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
}
+8926
View File
File diff suppressed because it is too large. Load diff
+43 -57
View File
@@ -1,73 +1,59 @@
{ {
"name": "pkg-placeholder", "name": "@antfu/ts-starter",
"type": "module",
"version": "0.0.0", "version": "0.0.0",
"packageManager": "pnpm@8.8.0", "description": "",
"description": "_description_", "main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"author": "Anthony Fu <anthonyfu117@hotmail.com>", "author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT", "license": "MIT",
"funding": "https://github.com/sponsors/antfu", "sideEffects": false,
"homepage": "https://github.com/antfu/pkg-placeholder#readme", "bugs": {
"url": "https://github.com/<placeholder>/issues"
},
"homepage": "https://github.com/<placeholder>#readme",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/antfu/pkg-placeholder.git" "url": "git+https://github.com/<placeholder>.git"
}, },
"bugs": "https://github.com/antfu/pkg-placeholder/issues", "scripts": {
"keywords": [], "prepublishOnly": "npm run build",
"sideEffects": false, "watch": "npm run build -- --watch",
"exports": { "dev": "esno src/index.ts",
".": { "build": "tsup src/index.ts --format cjs,esm --dts",
"types": "./dist/index.d.ts", "publish:ci": "npm publish --access public",
"import": "./dist/index.mjs", "release": "npx bumpp --commit --push --tag && npm run publish:ci",
"require": "./dist/index.cjs" "lint": "eslint \"{src,test}/**/*.ts\"",
"lint:fix": "npm run lint -- --fix",
"test": "jest"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
} }
}, },
"main": "./dist/index.mjs", "lint-staged": {
"module": "./dist/index.mjs", "*.{ts,js}": [
"types": "./dist/index.d.ts", "eslint --fix",
"typesVersions": { "git add"
"*": { ]
"*": [
"./dist/*",
"./dist/index.d.ts"
]
}
}, },
"files": [ "files": [
"dist" "dist"
], ],
"scripts": { "dependencies": {},
"build": "unbuild",
"dev": "unbuild --stub",
"lint": "eslint .",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit",
"prepare": "simple-git-hooks"
},
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^1.0.0-beta.22", "@antfu/eslint-config-ts": "^0.4.3",
"@antfu/ni": "^0.21.8", "@types/jest": "^26.0.15",
"@antfu/utils": "^0.7.6", "@types/node": "^14.14.6",
"@types/node": "^20.8.3", "eslint": "^7.12.1",
"bumpp": "^9.2.0", "eslint-plugin-jest": "^24.1.0",
"eslint": "^8.51.0", "esno": "^0.2.4",
"esno": "^0.17.0", "husky": "^4.3.0",
"lint-staged": "^14.0.1", "jest": "^26.6.3",
"pnpm": "^8.8.0", "lint-staged": "^10.5.1",
"rimraf": "^5.0.5", "ts-jest": "^26.4.3",
"simple-git-hooks": "^2.9.0", "tsup": "^3.7.1",
"typescript": "^5.2.2", "typescript": "^4.0.5"
"unbuild": "^2.0.0",
"vite": "^4.4.11",
"vitest": "^0.34.6"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
} }
} }
-4384
View File
File diff suppressed because it is too large. Load diff
-3
View File
@@ -1,3 +0,0 @@
packages:
- playground
- examples/*
+5
View File
@@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}
+1 -2
View File
@@ -1,2 +1 @@
export const one = 1 export * from './number'
export const two = 2
+2
View File
@@ -0,0 +1,2 @@
export const one = 1
export const two = 2
+2 -2
View File
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest' import { one } from '../src'
describe('should', () => { describe('should', () => {
it('exported', () => { it('exported', () => {
expect(1).toEqual(1) expect(one).toEqual(1)
}) })
}) })
+3 -5
View File
@@ -1,14 +1,12 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es2018", "target": "es2017",
"lib": ["esnext"],
"module": "esnext", "module": "esnext",
"lib": ["esnext"],
"moduleResolution": "node", "moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true, "esModuleInterop": true,
"strict": true, "strict": true,
"strictNullChecks": true, "strictNullChecks": true,
"skipDefaultLibCheck": true, "resolveJsonModule": true
"skipLibCheck": true
} }
} }