Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cdb1849476 | ||
|
55ffba3288 | ||
|
8ddaee3bf8 | ||
|
af2c3273cf | ||
|
12e57fce54 | ||
|
b08b769a8a | ||
|
65cef9437a | ||
|
f1b9dc396b | ||
|
b8fe7fe4e7 | ||
|
001de3b060 | ||
|
761a0ce4ee | ||
|
a9d330cac3 | ||
|
540786d482 | ||
|
b876b7b1d9 | ||
|
d463449db4 | ||
|
37d30e9e7d | ||
|
58b8383d4c | ||
|
35a5d3ef9d | ||
|
f618005402 | ||
|
a9b6d5f9ee | ||
|
e6a4d6db8b | ||
|
ed0f5b1d76 | ||
|
65222e2e3a |
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-monorepo",
|
"name": "@antfu/eslint-config-monorepo",
|
||||||
"version": "0.22.0",
|
"version": "0.25.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"packageManager": "pnpm@7.1.0",
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"prepare": "pnpm -r run stub",
|
"prepare": "pnpm -r run stub",
|
||||||
@@ -12,8 +13,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "*",
|
"@antfu/eslint-config": "*",
|
||||||
"bumpp": "^7.1.1",
|
"bumpp": "^7.1.1",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.16.0",
|
||||||
"eslint-plugin-antfu": "workspace:*",
|
"eslint-plugin-antfu": "workspace:*",
|
||||||
"typescript": "^4.6.3"
|
"typescript": "^4.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config",
|
"name": "@antfu/eslint-config",
|
||||||
"version": "0.22.0",
|
"version": "0.25.2",
|
||||||
"description": "",
|
"description": "Anthony's ESLint config",
|
||||||
"keywords": [],
|
|
||||||
"license": "MIT",
|
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/antfu/eslint-config",
|
||||||
|
"keywords": [
|
||||||
|
"eslint-config"
|
||||||
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js"
|
"index.js"
|
||||||
@@ -15,24 +18,21 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antfu/eslint-config-react": "workspace:*",
|
"@antfu/eslint-config-react": "workspace:*",
|
||||||
"@antfu/eslint-config-vue": "workspace:*",
|
"@antfu/eslint-config-vue": "workspace:*",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
"@typescript-eslint/eslint-plugin": "^5.26.0",
|
||||||
"@typescript-eslint/parser": "^5.20.0",
|
"@typescript-eslint/parser": "^5.26.0",
|
||||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||||
"eslint-plugin-html": "^6.2.0",
|
"eslint-plugin-html": "^6.2.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-jsonc": "^2.2.1",
|
"eslint-plugin-jsonc": "^2.2.1",
|
||||||
"eslint-plugin-n": "^15.1.0",
|
"eslint-plugin-n": "^15.2.0",
|
||||||
"eslint-plugin-promise": "^6.0.0",
|
"eslint-plugin-promise": "^6.0.0",
|
||||||
"eslint-plugin-unicorn": "^42.0.0",
|
"eslint-plugin-unicorn": "^42.0.0",
|
||||||
"eslint-plugin-vue": "^8.7.1",
|
"eslint-plugin-vue": "^9.0.1",
|
||||||
"eslint-plugin-yml": "^0.14.0",
|
"eslint-plugin-yml": "^1.0.0",
|
||||||
"jsonc-eslint-parser": "^2.1.0",
|
"jsonc-eslint-parser": "^2.1.0",
|
||||||
"yaml-eslint-parser": "^0.5.0"
|
"yaml-eslint-parser": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.14.0"
|
"eslint": "^8.16.0"
|
||||||
},
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ module.exports = {
|
|||||||
browser: true,
|
browser: true,
|
||||||
node: true,
|
node: true,
|
||||||
},
|
},
|
||||||
|
reportUnusedDisableDirectives: true,
|
||||||
extends: [
|
extends: [
|
||||||
'./standard',
|
'./standard',
|
||||||
'plugin:import/recommended',
|
'plugin:import/recommended',
|
||||||
@@ -14,6 +15,7 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
ignorePatterns: [
|
ignorePatterns: [
|
||||||
'*.min.*',
|
'*.min.*',
|
||||||
|
'*.d.ts',
|
||||||
'CHANGELOG.md',
|
'CHANGELOG.md',
|
||||||
'dist',
|
'dist',
|
||||||
'LICENSE*',
|
'LICENSE*',
|
||||||
@@ -44,9 +46,15 @@ module.exports = {
|
|||||||
files: ['*.json', '*.json5'],
|
files: ['*.json', '*.json5'],
|
||||||
parser: 'jsonc-eslint-parser',
|
parser: 'jsonc-eslint-parser',
|
||||||
rules: {
|
rules: {
|
||||||
'jsonc/quotes': ['error', 'double'],
|
'jsonc/array-bracket-spacing': ['error', 'never'],
|
||||||
'jsonc/quote-props': ['error', 'always'],
|
|
||||||
'jsonc/comma-dangle': ['error', 'never'],
|
'jsonc/comma-dangle': ['error', 'never'],
|
||||||
|
'jsonc/comma-style': ['error', 'last'],
|
||||||
|
'jsonc/indent': ['error', 2],
|
||||||
|
'jsonc/key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
||||||
|
'jsonc/no-octal-escape': 'error',
|
||||||
|
'jsonc/object-curly-newline': ['error', { multiline: true, consistent: true }],
|
||||||
|
'jsonc/object-curly-spacing': ['error', 'always'],
|
||||||
|
'jsonc/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -65,33 +73,47 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
pathPattern: '^$',
|
pathPattern: '^$',
|
||||||
order: [
|
order: [
|
||||||
|
'publisher',
|
||||||
'name',
|
'name',
|
||||||
|
'displayName',
|
||||||
'type',
|
'type',
|
||||||
'version',
|
'version',
|
||||||
'private',
|
'private',
|
||||||
'packageManager',
|
'packageManager',
|
||||||
'description',
|
'description',
|
||||||
'keywords',
|
|
||||||
'license',
|
|
||||||
'author',
|
'author',
|
||||||
'repository',
|
'license',
|
||||||
'funding',
|
'funding',
|
||||||
|
'homepage',
|
||||||
|
'repository',
|
||||||
|
'bugs',
|
||||||
|
'keywords',
|
||||||
|
'categories',
|
||||||
|
'sideEffects',
|
||||||
|
'exports',
|
||||||
'main',
|
'main',
|
||||||
'module',
|
'module',
|
||||||
'types',
|
|
||||||
'unpkg',
|
'unpkg',
|
||||||
'jsdelivr',
|
'jsdelivr',
|
||||||
'exports',
|
'types',
|
||||||
'files',
|
'typesVersions',
|
||||||
'bin',
|
'bin',
|
||||||
'sideEffects',
|
'icon',
|
||||||
|
'files',
|
||||||
|
'engines',
|
||||||
|
'activationEvents',
|
||||||
|
'contributes',
|
||||||
'scripts',
|
'scripts',
|
||||||
'peerDependencies',
|
'peerDependencies',
|
||||||
'peerDependenciesMeta',
|
'peerDependenciesMeta',
|
||||||
'dependencies',
|
'dependencies',
|
||||||
'optionalDependencies',
|
'optionalDependencies',
|
||||||
'devDependencies',
|
'devDependencies',
|
||||||
|
'pnpm',
|
||||||
|
'overrides',
|
||||||
|
'resolutions',
|
||||||
'husky',
|
'husky',
|
||||||
|
'simple-git-hooks',
|
||||||
'lint-staged',
|
'lint-staged',
|
||||||
'eslintConfig',
|
'eslintConfig',
|
||||||
],
|
],
|
||||||
@@ -100,6 +122,14 @@ module.exports = {
|
|||||||
pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
|
pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
|
||||||
order: { type: 'asc' },
|
order: { type: 'asc' },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
pathPattern: '^exports.*$',
|
||||||
|
order: [
|
||||||
|
'types',
|
||||||
|
'require',
|
||||||
|
'import',
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -217,6 +247,7 @@ module.exports = {
|
|||||||
avoidQuotes: true,
|
avoidQuotes: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
'prefer-exponentiation-operator': 'error',
|
||||||
'prefer-rest-params': 'error',
|
'prefer-rest-params': 'error',
|
||||||
'prefer-spread': 'error',
|
'prefer-spread': 'error',
|
||||||
'prefer-template': 'error',
|
'prefer-template': 'error',
|
||||||
@@ -259,15 +290,13 @@ module.exports = {
|
|||||||
// Uppercase regex escapes
|
// Uppercase regex escapes
|
||||||
'unicorn/escape-case': 'error',
|
'unicorn/escape-case': 'error',
|
||||||
// Array.isArray instead of instanceof
|
// Array.isArray instead of instanceof
|
||||||
'unicorn/no-array-instanceof': 'error',
|
'unicorn/no-instanceof-array': 'error',
|
||||||
// Prevent deprecated `new Buffer()`
|
// Prevent deprecated `new Buffer()`
|
||||||
'unicorn/no-new-buffer': 'error',
|
'unicorn/no-new-buffer': 'error',
|
||||||
// Keep regex literals safe!
|
// Keep regex literals safe!
|
||||||
'unicorn/no-unsafe-regex': 'off',
|
'unicorn/no-unsafe-regex': 'off',
|
||||||
// Lowercase number formatting for octal, hex, binary (0x1'error' instead of 0X1'error')
|
// Lowercase number formatting for octal, hex, binary (0x1'error' instead of 0X1'error')
|
||||||
'unicorn/number-literal-case': 'error',
|
'unicorn/number-literal-case': 'error',
|
||||||
// ** instead of Math.pow()
|
|
||||||
'unicorn/prefer-exponentiation-operator': 'error',
|
|
||||||
// includes over indexOf when checking for existence
|
// includes over indexOf when checking for existence
|
||||||
'unicorn/prefer-includes': 'error',
|
'unicorn/prefer-includes': 'error',
|
||||||
// String methods startsWith/endsWith instead of more complicated stuff
|
// String methods startsWith/endsWith instead of more complicated stuff
|
||||||
@@ -282,6 +311,8 @@ module.exports = {
|
|||||||
'no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
|
'no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
|
||||||
'eslint-comments/disable-enable-pair': 'off',
|
'eslint-comments/disable-enable-pair': 'off',
|
||||||
'import/no-named-as-default-member': 'off',
|
'import/no-named-as-default-member': 'off',
|
||||||
|
'import/no-named-as-default': 'off',
|
||||||
|
'import/namespace': 'off',
|
||||||
'n/no-callback-literal': 'off',
|
'n/no-callback-literal': 'off',
|
||||||
|
|
||||||
'sort-imports': [
|
'sort-imports': [
|
||||||
|
@@ -1,10 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-basic",
|
"name": "@antfu/eslint-config-basic",
|
||||||
"version": "0.22.0",
|
"version": "0.25.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"keywords": [],
|
|
||||||
"license": "MIT",
|
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/antfu/eslint-config",
|
||||||
|
"keywords": [
|
||||||
|
"eslint-config"
|
||||||
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"*.js"
|
"*.js"
|
||||||
@@ -22,17 +25,14 @@
|
|||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-jsonc": "^2.2.1",
|
"eslint-plugin-jsonc": "^2.2.1",
|
||||||
"eslint-plugin-markdown": "^2.2.1",
|
"eslint-plugin-markdown": "^2.2.1",
|
||||||
"eslint-plugin-n": "^15.1.0",
|
"eslint-plugin-n": "^15.2.0",
|
||||||
"eslint-plugin-promise": "^6.0.0",
|
"eslint-plugin-promise": "^6.0.0",
|
||||||
"eslint-plugin-unicorn": "^42.0.0",
|
"eslint-plugin-unicorn": "^42.0.0",
|
||||||
"eslint-plugin-yml": "^0.14.0",
|
"eslint-plugin-yml": "^1.0.0",
|
||||||
"jsonc-eslint-parser": "^2.1.0",
|
"jsonc-eslint-parser": "^2.1.0",
|
||||||
"yaml-eslint-parser": "^0.5.0"
|
"yaml-eslint-parser": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.14.0"
|
"eslint": "^8.16.0"
|
||||||
},
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,17 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "eslint-plugin-antfu",
|
"name": "eslint-plugin-antfu",
|
||||||
"version": "0.22.0",
|
"version": "0.25.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/antfu/eslint-config",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"require": "./dist/index.cjs",
|
|
||||||
"import": "./dist/index.mjs",
|
|
||||||
"types": "./dist/index.d.ts"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
@@ -22,10 +16,10 @@
|
|||||||
"prepublishOnly": "nr build"
|
"prepublishOnly": "nr build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/utils": "^5.20.0"
|
"@typescript-eslint/utils": "^5.26.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"unbuild": "^0.7.4",
|
"unbuild": "^0.7.4",
|
||||||
"vitest": "^0.9.4"
|
"vitest": "^0.12.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-react",
|
"name": "@antfu/eslint-config-react",
|
||||||
"version": "0.22.0",
|
"version": "0.25.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"keywords": [],
|
|
||||||
"license": "MIT",
|
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/antfu/eslint-config",
|
||||||
|
"keywords": [
|
||||||
|
"eslint-config"
|
||||||
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js"
|
"index.js"
|
||||||
@@ -15,16 +18,13 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": ">=7.4.0"
|
"eslint": ">=7.4.0"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antfu/eslint-config-ts": "workspace:*",
|
"@antfu/eslint-config-ts": "workspace:*",
|
||||||
"eslint-plugin-react": "^7.29.4"
|
"eslint-plugin-react": "^7.30.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.16.0",
|
||||||
"react": "^18.0.0",
|
"react": "^18.1.0",
|
||||||
"typescript": "^4.6.3"
|
"typescript": "^4.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const basic = require('@antfu/eslint-config-basic')
|
const basic = require('@antfu/eslint-config-basic')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -22,7 +21,6 @@ module.exports = {
|
|||||||
'@typescript-eslint/type-annotation-spacing': ['error', {}],
|
'@typescript-eslint/type-annotation-spacing': ['error', {}],
|
||||||
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false }],
|
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false }],
|
||||||
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
||||||
'@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
|
|
||||||
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
||||||
|
|
||||||
// Override JS
|
// Override JS
|
||||||
@@ -114,11 +112,12 @@ module.exports = {
|
|||||||
// '@typescript-eslint/dot-notation': ['error', { allowKeywords: true }],
|
// '@typescript-eslint/dot-notation': ['error', { allowKeywords: true }],
|
||||||
|
|
||||||
// off
|
// off
|
||||||
'@typescript-eslint/camelcase': 'off',
|
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
||||||
|
'@typescript-eslint/naming-convention': 'off',
|
||||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||||
'@typescript-eslint/explicit-member-accessibility': 'off',
|
'@typescript-eslint/explicit-member-accessibility': 'off',
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
'@typescript-eslint/no-parameter-properties': 'off',
|
'@typescript-eslint/parameter-properties': 'off',
|
||||||
'@typescript-eslint/no-empty-interface': 'off',
|
'@typescript-eslint/no-empty-interface': 'off',
|
||||||
'@typescript-eslint/ban-ts-ignore': 'off',
|
'@typescript-eslint/ban-ts-ignore': 'off',
|
||||||
'@typescript-eslint/no-empty-function': 'off',
|
'@typescript-eslint/no-empty-function': 'off',
|
||||||
@@ -126,5 +125,6 @@ module.exports = {
|
|||||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||||
'@typescript-eslint/ban-types': 'off',
|
'@typescript-eslint/ban-types': 'off',
|
||||||
'@typescript-eslint/no-namespace': 'off',
|
'@typescript-eslint/no-namespace': 'off',
|
||||||
|
'@typescript-eslint/triple-slash-reference': 'off',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -1,27 +1,27 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-ts",
|
"name": "@antfu/eslint-config-ts",
|
||||||
"version": "0.22.0",
|
"version": "0.25.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"keywords": [],
|
|
||||||
"license": "MIT",
|
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/antfu/eslint-config",
|
||||||
|
"keywords": [
|
||||||
|
"eslint-config"
|
||||||
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js"
|
"index.js"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": ">=7.4.0",
|
"eslint": ">=7.4.0",
|
||||||
"typescript": ">=3.9"
|
"typescript": ">=3.9"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antfu/eslint-config-basic": "workspace:*",
|
"@antfu/eslint-config-basic": "workspace:*",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
"@typescript-eslint/eslint-plugin": "^5.26.0",
|
||||||
"@typescript-eslint/parser": "^5.20.0"
|
"@typescript-eslint/parser": "^5.26.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.14.0"
|
"eslint": "^8.16.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,7 @@ module.exports = {
|
|||||||
'vue/require-prop-types': 'off',
|
'vue/require-prop-types': 'off',
|
||||||
'vue/require-default-prop': 'off',
|
'vue/require-default-prop': 'off',
|
||||||
'vue/multi-word-component-names': 'off',
|
'vue/multi-word-component-names': 'off',
|
||||||
|
'vue/prefer-import-from-vue': 'off',
|
||||||
|
|
||||||
// reactivity transform
|
// reactivity transform
|
||||||
'vue/no-setup-props-destructure': 'off',
|
'vue/no-setup-props-destructure': 'off',
|
||||||
@@ -30,5 +31,68 @@ module.exports = {
|
|||||||
'vue/component-tags-order': ['error', {
|
'vue/component-tags-order': ['error', {
|
||||||
order: ['script', 'template', 'style'],
|
order: ['script', 'template', 'style'],
|
||||||
}],
|
}],
|
||||||
|
'vue/block-tag-newline': ['error', {
|
||||||
|
singleline: 'always',
|
||||||
|
multiline: 'always',
|
||||||
|
}],
|
||||||
|
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
|
||||||
|
'vue/component-options-name-casing': ['error', 'PascalCase'],
|
||||||
|
'vue/custom-event-name-casing': ['error', 'camelCase'],
|
||||||
|
'vue/define-macros-order': ['error', {
|
||||||
|
order: ['defineProps', 'defineEmits'],
|
||||||
|
}],
|
||||||
|
'vue/html-comment-content-spacing': ['error', 'always', {
|
||||||
|
exceptions: ['-'],
|
||||||
|
}],
|
||||||
|
'vue/no-restricted-v-bind': ['error', '/^v-/'],
|
||||||
|
'vue/no-useless-v-bind': 'error',
|
||||||
|
'vue/no-v-text-v-html-on-component': 'error',
|
||||||
|
'vue/padding-line-between-blocks': ['error', 'always'],
|
||||||
|
'vue/prefer-separate-static-class': 'error',
|
||||||
|
|
||||||
|
// extensions
|
||||||
|
'vue/array-bracket-spacing': ['error', 'never'],
|
||||||
|
'vue/arrow-spacing': ['error', { before: true, after: true }],
|
||||||
|
'vue/block-spacing': ['error', 'always'],
|
||||||
|
'vue/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
|
||||||
|
'vue/comma-dangle': ['error', 'always-multiline'],
|
||||||
|
'vue/comma-spacing': ['error', { before: false, after: true }],
|
||||||
|
'vue/comma-style': ['error', 'last'],
|
||||||
|
'vue/dot-location': ['error', 'property'],
|
||||||
|
'vue/dot-notation': ['error', { allowKeywords: true }],
|
||||||
|
'vue/eqeqeq': ['error', 'smart'],
|
||||||
|
// 'vue/func-call-spacing': ['off', 'never'],
|
||||||
|
'vue/key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
||||||
|
'vue/keyword-spacing': ['error', { before: true, after: true }],
|
||||||
|
'vue/no-constant-condition': 'warn',
|
||||||
|
'vue/no-empty-pattern': 'error',
|
||||||
|
'vue/no-extra-parens': ['error', 'functions'],
|
||||||
|
'vue/no-irregular-whitespace': 'error',
|
||||||
|
'vue/no-loss-of-precision': 'error',
|
||||||
|
'vue/no-restricted-syntax': [
|
||||||
|
'error',
|
||||||
|
'DebuggerStatement',
|
||||||
|
'LabeledStatement',
|
||||||
|
'WithStatement',
|
||||||
|
],
|
||||||
|
'vue/no-sparse-arrays': 'error',
|
||||||
|
'vue/object-curly-newline': ['error', { multiline: true, consistent: true }],
|
||||||
|
'vue/object-curly-spacing': ['error', 'always'],
|
||||||
|
'vue/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
|
||||||
|
'vue/object-shorthand': [
|
||||||
|
'error',
|
||||||
|
'always',
|
||||||
|
{
|
||||||
|
ignoreConstructors: false,
|
||||||
|
avoidQuotes: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'vue/operator-linebreak': ['error', 'before'],
|
||||||
|
'vue/prefer-template': 'error',
|
||||||
|
'vue/quote-props': ['error', 'consistent-as-needed'],
|
||||||
|
'vue/space-in-parens': ['error', 'never'],
|
||||||
|
'vue/space-infix-ops': 'error',
|
||||||
|
'vue/space-unary-ops': ['error', { words: true, nonwords: false }],
|
||||||
|
'vue/template-curly-spacing': 'error',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@antfu/eslint-config-vue",
|
"name": "@antfu/eslint-config-vue",
|
||||||
"version": "0.22.0",
|
"version": "0.25.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"keywords": [],
|
|
||||||
"license": "MIT",
|
|
||||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"eslint-config"
|
||||||
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js"
|
"index.js"
|
||||||
@@ -12,14 +14,11 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": ">=7.4.0"
|
"eslint": ">=7.4.0"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antfu/eslint-config-ts": "workspace:*",
|
"@antfu/eslint-config-ts": "workspace:*",
|
||||||
"eslint-plugin-vue": "^8.7.1"
|
"eslint-plugin-vue": "^9.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.14.0"
|
"eslint": "^8.16.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
727
pnpm-lock.yaml
generated
727
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user