Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6189a9225c | ||
|
46a39e1506 | ||
|
1c37b247c5 | ||
|
2a1e59f43b | ||
|
94b5fdddad | ||
|
65aec3f101 | ||
|
b53ffae83e | ||
|
20c01380c9 | ||
|
6b3f6e620b | ||
|
693eba91a8 | ||
|
b820b0fd92 | ||
|
f8014b745e | ||
|
95e28e4a4a |
@@ -15,48 +15,48 @@
|
||||
"up": "taze major -I"
|
||||
},
|
||||
"dependencies": {
|
||||
"@unocss/reset": "^0.45.8",
|
||||
"@vueuse/core": "^9.1.0",
|
||||
"@vueuse/head": "^0.7.9",
|
||||
"@unocss/reset": "^0.47.0",
|
||||
"@vueuse/core": "^9.6.0",
|
||||
"@vueuse/head": "^1.0.18",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.0.17",
|
||||
"vue": "^3.2.37",
|
||||
"vue-demi": "^0.13.6",
|
||||
"pinia": "^2.0.27",
|
||||
"vue": "^3.2.45",
|
||||
"vue-demi": "^0.13.11",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-router": "^4.1.3"
|
||||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.25.2",
|
||||
"@iconify-json/carbon": "^1.1.7",
|
||||
"@intlify/vite-plugin-vue-i18n": "^6.0.0",
|
||||
"@antfu/eslint-config": "^0.31.0",
|
||||
"@iconify-json/carbon": "^1.1.11",
|
||||
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
|
||||
"@types/markdown-it-link-attributes": "^3.0.1",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@vitejs/plugin-vue": "^3.0.1",
|
||||
"@vue/test-utils": "^2.0.2",
|
||||
"@vitejs/plugin-vue": "^3.2.0",
|
||||
"@vue/test-utils": "^2.2.4",
|
||||
"critters": "^0.0.16",
|
||||
"cross-env": "^7.0.3",
|
||||
"cypress": "^10.4.0",
|
||||
"eslint": "^8.21.0",
|
||||
"cypress": "^11.2.0",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-plugin-cypress": "^2.12.1",
|
||||
"https-localhost": "^4.7.1",
|
||||
"markdown-it-link-attributes": "^4.0.0",
|
||||
"markdown-it-shiki": "^0.5.1",
|
||||
"pnpm": "^7.8.0",
|
||||
"shiki": "^0.10.1",
|
||||
"taze": "^0.7.6",
|
||||
"typescript": "^4.7.4",
|
||||
"unocss": "^0.45.5",
|
||||
"unplugin-auto-import": "^0.11.0",
|
||||
"unplugin-vue-components": "^0.22.0",
|
||||
"vite": "^3.0.4",
|
||||
"vite-plugin-inspect": "^0.6.0",
|
||||
"vite-plugin-pages": "^0.25.0",
|
||||
"vite-plugin-pwa": "^0.12.3",
|
||||
"markdown-it-link-attributes": "^4.0.1",
|
||||
"markdown-it-shiki": "^0.6.1",
|
||||
"pnpm": "^7.17.1",
|
||||
"shiki": "^0.11.1",
|
||||
"taze": "^0.8.4",
|
||||
"typescript": "^4.9.3",
|
||||
"unocss": "^0.47.0",
|
||||
"unplugin-auto-import": "^0.12.0",
|
||||
"unplugin-vue-components": "^0.22.11",
|
||||
"vite": "^3.2.4",
|
||||
"vite-plugin-inspect": "^0.7.9",
|
||||
"vite-plugin-pages": "^0.27.1",
|
||||
"vite-plugin-pwa": "^0.13.3",
|
||||
"vite-plugin-vue-layouts": "^0.7.0",
|
||||
"vite-plugin-vue-markdown": "^0.21.1",
|
||||
"vite-ssg": "^0.20.2",
|
||||
"vite-ssg-sitemap": "^0.3.1",
|
||||
"vitest": "^0.21.0",
|
||||
"vue-tsc": "^0.39.5"
|
||||
"vite-plugin-vue-markdown": "^0.22.1",
|
||||
"vite-ssg": "^0.22.0",
|
||||
"vite-ssg-sitemap": "^0.4.3",
|
||||
"vitest": "^0.25.3",
|
||||
"vue-tsc": "^1.0.9"
|
||||
}
|
||||
}
|
||||
|
@@ -7,6 +7,8 @@ export const install: UserModule = ({ isClient, router }) => {
|
||||
if (to.path !== from.path)
|
||||
NProgress.start()
|
||||
})
|
||||
router.afterEach(() => { NProgress.done() })
|
||||
router.afterEach(() => {
|
||||
NProgress.done()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-monorepo",
|
||||
"version": "0.29.3",
|
||||
"version": "0.31.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@7.1.0",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
@@ -14,9 +14,9 @@
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "*",
|
||||
"bumpp": "^8.2.1",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-plugin-antfu": "workspace:*",
|
||||
"rimraf": "^3.0.2",
|
||||
"typescript": "^4.8.2"
|
||||
"typescript": "^4.9.3"
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config",
|
||||
"version": "0.29.3",
|
||||
"version": "0.31.1",
|
||||
"description": "Anthony's ESLint config",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
@@ -17,21 +17,21 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-vue": "workspace:*",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
||||
"@typescript-eslint/parser": "^5.36.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||
"@typescript-eslint/parser": "^5.45.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-html": "^7.1.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsonc": "^2.4.0",
|
||||
"eslint-plugin-n": "^15.2.5",
|
||||
"eslint-plugin-promise": "^6.0.1",
|
||||
"eslint-plugin-unicorn": "^43.0.2",
|
||||
"eslint-plugin-vue": "^9.4.0",
|
||||
"eslint-plugin-yml": "^1.1.0",
|
||||
"eslint-plugin-jsonc": "^2.5.0",
|
||||
"eslint-plugin-n": "^15.5.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-unicorn": "^45.0.1",
|
||||
"eslint-plugin-vue": "^9.8.0",
|
||||
"eslint-plugin-yml": "^1.2.0",
|
||||
"jsonc-eslint-parser": "^2.1.0",
|
||||
"yaml-eslint-parser": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.23.0"
|
||||
"eslint": "^8.28.0"
|
||||
}
|
||||
}
|
||||
|
@@ -285,6 +285,7 @@ module.exports = {
|
||||
'require-await': 'off',
|
||||
'no-return-assign': 'off',
|
||||
'operator-linebreak': ['error', 'before'],
|
||||
'max-statements-per-line': ['error', { max: 1 }],
|
||||
|
||||
// unicorns
|
||||
// Pass error message when throwing errors
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-basic",
|
||||
"version": "0.29.3",
|
||||
"version": "0.31.1",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
@@ -23,17 +23,17 @@
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-html": "^7.1.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsonc": "^2.4.0",
|
||||
"eslint-plugin-jsonc": "^2.5.0",
|
||||
"eslint-plugin-markdown": "^3.0.0",
|
||||
"eslint-plugin-n": "^15.2.5",
|
||||
"eslint-plugin-n": "^15.5.1",
|
||||
"eslint-plugin-no-only-tests": "^3.1.0",
|
||||
"eslint-plugin-promise": "^6.0.1",
|
||||
"eslint-plugin-unicorn": "^43.0.2",
|
||||
"eslint-plugin-yml": "^1.1.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-unicorn": "^45.0.1",
|
||||
"eslint-plugin-yml": "^1.2.0",
|
||||
"jsonc-eslint-parser": "^2.1.0",
|
||||
"yaml-eslint-parser": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.23.0"
|
||||
"eslint": "^8.28.0"
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eslint-plugin-antfu",
|
||||
"version": "0.29.3",
|
||||
"version": "0.31.1",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/antfu/eslint-config",
|
||||
"main": "./dist/index.cjs",
|
||||
@@ -16,11 +16,11 @@
|
||||
"prepublishOnly": "nr build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/utils": "^5.36.1"
|
||||
"@typescript-eslint/utils": "^5.45.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.11.8",
|
||||
"unbuild": "^0.8.10",
|
||||
"vitest": "^0.22.1"
|
||||
"@types/node": "^18.11.9",
|
||||
"unbuild": "^1.0.1",
|
||||
"vitest": "^0.25.3"
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,9 @@ type Foo<
|
||||
`interface Log {
|
||||
<T>(name: T): void
|
||||
}`,
|
||||
`interface Foo {
|
||||
foo?: <T>(name: T) => void
|
||||
}`,
|
||||
]
|
||||
const invalids = [
|
||||
['type Foo<T=true> = T', 'type Foo<T = true> = T'],
|
||||
|
@@ -23,7 +23,7 @@ export default createEslintRule<Options, MessageIds>({
|
||||
const sourceCode = context.getSourceCode()
|
||||
return {
|
||||
TSTypeParameterDeclaration: (node) => {
|
||||
if (!['TSCallSignatureDeclaration', 'ArrowFunctionExpression'].includes(node.parent.type)) {
|
||||
if (!['TSCallSignatureDeclaration', 'ArrowFunctionExpression', 'TSFunctionType'].includes(node.parent.type)) {
|
||||
const pre = sourceCode.text.slice(0, node.range[0])
|
||||
const preSpace = pre.match(/(\s+)$/)?.[0]
|
||||
// strip space before <T>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-react",
|
||||
"version": "0.29.3",
|
||||
"version": "0.31.1",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
@@ -20,12 +20,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-ts": "workspace:*",
|
||||
"eslint-plugin-react": "^7.31.1",
|
||||
"eslint-plugin-react": "^7.31.11",
|
||||
"eslint-plugin-react-hooks": "^4.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.23.0",
|
||||
"eslint": "^8.28.0",
|
||||
"react": "^18.2.0",
|
||||
"typescript": "^4.8.2"
|
||||
"typescript": "^4.9.3"
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-ts",
|
||||
"version": "0.29.3",
|
||||
"version": "0.31.1",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
@@ -18,10 +18,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-basic": "workspace:*",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
||||
"@typescript-eslint/parser": "^5.36.1"
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||
"@typescript-eslint/parser": "^5.45.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.23.0"
|
||||
"eslint": "^8.28.0"
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,10 @@
|
||||
const { isPackageExists } = require('local-pkg')
|
||||
|
||||
const TS = isPackageExists('typescript')
|
||||
|
||||
if (!TS)
|
||||
console.warn('[@antfu/eslint-config] TypeScript is not installed, fallback to JS only.')
|
||||
|
||||
module.exports = {
|
||||
overrides: [
|
||||
{
|
||||
@@ -9,13 +16,17 @@ module.exports = {
|
||||
rules: {
|
||||
'no-unused-vars': 'off',
|
||||
'no-undef': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
...(TS
|
||||
? { '@typescript-eslint/no-unused-vars': 'off' }
|
||||
: null),
|
||||
},
|
||||
},
|
||||
],
|
||||
extends: [
|
||||
'plugin:vue/vue3-recommended',
|
||||
'@antfu/eslint-config-ts',
|
||||
TS
|
||||
? '@antfu/eslint-config-ts'
|
||||
: '@antfu/eslint-config-basic',
|
||||
],
|
||||
rules: {
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-vue",
|
||||
"version": "0.29.3",
|
||||
"version": "0.31.1",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
@@ -15,10 +15,12 @@
|
||||
"eslint": ">=7.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-basic": "workspace:*",
|
||||
"@antfu/eslint-config-ts": "workspace:*",
|
||||
"eslint-plugin-vue": "^9.4.0"
|
||||
"eslint-plugin-vue": "^9.8.0",
|
||||
"local-pkg": "^0.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.23.0"
|
||||
"eslint": "^8.28.0"
|
||||
}
|
||||
}
|
||||
|
1319
pnpm-lock.yaml
generated
1319
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user