Compare commits

..

16 Commits

Author SHA1 Message Date
Anthony Fu
4e77637da4 chore: release v0.39.5 2023-06-04 16:20:46 +02:00
Anthony Fu
abf5c27385 fix: disable @typescript-eslint/consistent-type-assertions 2023-06-04 16:20:42 +02:00
曾明健
7b48da27dc chore(basic): refesh standard.js (#193) 2023-06-02 16:04:48 +02:00
曾明健
0947ddb151 feat(basic): ban deprecated syntax (#194) 2023-06-02 16:04:01 +02:00
L.Rain
0a9c9b0384 chore: simplified off rules (#192) 2023-06-01 16:08:06 +02:00
曾明健
84ae087ea0 chore(basic): add the missing restricted rules about window object (#191) 2023-05-31 14:40:11 +02:00
Anthony Fu
5d908028ca chore: release v0.39.4 2023-05-31 09:53:19 +02:00
Anthony Fu
610d886afd chore: remove window restriction 2023-05-31 09:52:26 +02:00
曾明健
aefa76e48a feat(basic): ban some deprecated global functions (#190) 2023-05-31 09:51:21 +02:00
曾明健
e787e9a647 feat(basic): ban global variable (#189) 2023-05-26 17:39:10 +02:00
曾明健
a3598d36d2 feat(ts): enable @typescript-eslint/consistent-type-assertions (#188) 2023-05-26 17:38:54 +02:00
Anthony Fu
7b399a63db chore: release v0.39.3 2023-05-23 13:39:23 +02:00
Anthony Fu
bb09e1d6b4 fix(vue): disable vue/no-dupe-keys 2023-05-23 13:39:17 +02:00
Anthony Fu
f97f7ef7de chore: release v0.39.2 2023-05-23 12:42:39 +02:00
Anthony Fu
0a19d26da6 chore: update deps 2023-05-23 12:42:31 +02:00
Kaivan Wong
ec494867f9 feat: update eslint-plugin-vue version (#186) 2023-05-23 12:41:23 +02:00
13 changed files with 431 additions and 396 deletions

View File

@@ -1,7 +1,7 @@
{
"type": "module",
"private": true,
"packageManager": "pnpm@8.3.0",
"packageManager": "pnpm@8.5.1",
"scripts": {
"build": "vite-ssg build",
"dev": "vite --port 3333 --open",
@@ -15,48 +15,48 @@
"up": "taze major -I"
},
"dependencies": {
"@unocss/reset": "^0.51.4",
"@vueuse/core": "^10.0.2",
"@unocss/reset": "^0.52.1",
"@vueuse/core": "^10.1.2",
"@vueuse/head": "^1.1.26",
"nprogress": "^0.2.0",
"pinia": "^2.0.34",
"vue": "^3.2.47",
"vue-demi": "^0.14.0",
"pinia": "^2.1.3",
"vue": "^3.3.4",
"vue-demi": "^0.14.5",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.6"
"vue-router": "^4.2.1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.38.4",
"@antfu/eslint-config": "^0.39.1",
"@iconify-json/carbon": "^1.1.16",
"@intlify/vite-plugin-vue-i18n": "^7.0.0",
"@types/markdown-it-link-attributes": "^3.0.1",
"@types/nprogress": "^0.2.0",
"@vitejs/plugin-vue": "^4.1.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/test-utils": "^2.3.2",
"critters": "^0.0.16",
"cross-env": "^7.0.3",
"cypress": "^12.10.0",
"eslint": "^8.38.0",
"eslint-plugin-cypress": "^2.13.2",
"cypress": "^12.12.0",
"eslint": "^8.41.0",
"eslint-plugin-cypress": "^2.13.3",
"https-localhost": "^4.7.1",
"markdown-it-link-attributes": "^4.0.1",
"markdown-it-shiki": "^0.8.0",
"pnpm": "^8.3.0",
"shiki": "^0.14.1",
"taze": "^0.9.1",
"markdown-it-shiki": "^0.9.0",
"pnpm": "^8.5.1",
"shiki": "^0.14.2",
"taze": "^0.10.1",
"typescript": "^5.0.4",
"unocss": "^0.51.4",
"unplugin-auto-import": "^0.15.3",
"unocss": "^0.52.1",
"unplugin-auto-import": "^0.16.2",
"unplugin-vue-components": "^0.24.1",
"vite": "^4.2.2",
"vite-plugin-inspect": "^0.7.22",
"vite-plugin-pages": "^0.29.0",
"vite-plugin-pwa": "^0.14.7",
"vite": "^4.3.8",
"vite-plugin-inspect": "^0.7.26",
"vite-plugin-pages": "^0.30.1",
"vite-plugin-pwa": "^0.15.0",
"vite-plugin-vue-layouts": "^0.8.0",
"vite-plugin-vue-markdown": "^0.22.5",
"vite-plugin-vue-markdown": "^0.23.5",
"vite-ssg": "^0.22.2",
"vite-ssg-sitemap": "^0.4.3",
"vitest": "^0.30.1",
"vue-tsc": "^1.2.0"
"vite-ssg-sitemap": "^0.5.1",
"vitest": "^0.31.1",
"vue-tsc": "^1.6.5"
}
}

View File

@@ -1,8 +1,8 @@
{
"name": "@antfu/eslint-config-monorepo",
"version": "0.39.1",
"version": "0.39.5",
"private": true,
"packageManager": "pnpm@8.3.0",
"packageManager": "pnpm@8.5.1",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
"scripts": {
@@ -15,9 +15,9 @@
"devDependencies": {
"@antfu/eslint-config": "workspace:*",
"bumpp": "^9.1.0",
"eslint": "^8.38.0",
"eslint": "^8.41.0",
"eslint-plugin-antfu": "link:./packages/eslint-plugin-antfu",
"rimraf": "^5.0.0",
"rimraf": "^5.0.1",
"typescript": "^5.0.4"
}
}

View File

@@ -240,7 +240,7 @@ module.exports = {
'no-debugger': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-cond-assign': ['error', 'always'],
'func-call-spacing': ['off', 'never'],
'func-call-spacing': 'off',
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
'no-restricted-syntax': [
@@ -259,6 +259,32 @@ module.exports = {
asyncArrow: 'always',
},
],
'no-restricted-globals': [
'error',
{ name: 'global', message: 'Use `globalThis` instead.' },
{ name: 'self', message: 'Use `globalThis` instead.' },
{ name: 'isNaN', message: 'Use `Number.isNaN` instead.' },
{ name: 'isFinite', message: 'Use `Number.isFinite` instead.' },
{ name: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
{ name: 'parseInt', message: 'Use `Number.parseInt` instead.' },
],
'no-restricted-properties': [
'error',
{ object: 'globalThis', property: 'isNaN', message: 'Use `Number.isNaN` instead.' },
{ object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead.' },
{ object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
{ object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead.' },
{ object: 'window', property: 'isNaN', message: 'Use `Number.isNaN` instead.' },
{ object: 'window', property: 'isFinite', message: 'Use `Number.isFinite` instead.' },
{ object: 'window', property: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
{ object: 'window', property: 'parseInt', message: 'Use `Number.parseInt` instead.' },
{ object: 'Math', property: 'pow', message: 'Use the exponentiation operator (**) instead.' },
{ property: '__proto__', message: 'Use `Object.getPrototypeOf` instead.' },
{ property: '__defineGetter__', message: 'Use `Object.defineProperty` instead.' },
{ property: '__defineSetter__', message: 'Use `Object.defineProperty` instead.' },
{ property: '__lookupGetter__', message: 'Use `Object.getOwnPropertyDescriptor` instead.' },
{ property: '__lookupSetter__', message: 'Use `Object.getOwnPropertyDescriptor` instead.' },
],
// es6
'no-var': 'error',
@@ -307,7 +333,7 @@ module.exports = {
'array-callback-return': 'error',
'block-scoped-var': 'error',
'consistent-return': 'off',
'complexity': ['off', 11],
'complexity': 'off',
'eqeqeq': ['error', 'smart'],
'no-alert': 'warn',
'no-case-declarations': 'error',

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-basic",
"version": "0.39.1",
"version": "0.39.5",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -23,18 +23,18 @@
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsonc": "^2.7.0",
"eslint-plugin-jsonc": "^2.8.0",
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-unicorn": "^47.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"eslint-plugin-yml": "^1.5.0",
"jsonc-eslint-parser": "^2.2.0",
"yaml-eslint-parser": "^1.2.0"
"eslint-plugin-yml": "^1.7.0",
"jsonc-eslint-parser": "^2.3.0",
"yaml-eslint-parser": "^1.2.2"
},
"devDependencies": {
"eslint": "^8.38.0"
"eslint": "^8.41.0"
}
}

View File

@@ -9,20 +9,24 @@ module.exports = {
},
sourceType: 'module',
},
env: {
es2021: true,
node: true,
},
plugins: [
'import',
'n',
'promise',
],
globals: {
document: 'readonly',
navigator: 'readonly',
window: 'readonly',
},
rules: {
'no-var': 'warn',
'object-shorthand': ['warn', 'properties'],
@@ -126,7 +130,7 @@ module.exports = {
'no-mixed-operators': ['error', {
groups: [
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
['&&', '||', '?:'],
['&&', '||'],
['in', 'instanceof'],
],
allowSamePrecedence: true,

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-react",
"version": "0.39.1",
"version": "0.39.5",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -24,7 +24,7 @@
"eslint-plugin-react-hooks": "^4.6.0"
},
"devDependencies": {
"eslint": "^8.38.0",
"eslint": "^8.41.0",
"react": "^18.2.0",
"typescript": "^5.0.4"
}

View File

@@ -72,7 +72,6 @@ module.exports = {
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/prefer-ts-expect-error': 'error',
'@typescript-eslint/no-require-imports': 'error',
// Override JS
'no-useless-constructor': 'off',
'indent': 'off',

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-ts",
"version": "0.39.1",
"version": "0.39.5",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -18,11 +18,11 @@
},
"dependencies": {
"@antfu/eslint-config-basic": "workspace:*",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"eslint-plugin-jest": "^27.2.1"
},
"devDependencies": {
"eslint": "^8.38.0"
"eslint": "^8.41.0"
}
}

View File

@@ -36,6 +36,7 @@ module.exports = {
'vue/multi-word-component-names': 'off',
'vue/prefer-import-from-vue': 'off',
'vue/no-v-text-v-html-on-component': 'off',
'vue/no-dupe-keys': 'off',
// reactivity transform
'vue/no-setup-props-destructure': 'off',

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-vue",
"version": "0.39.1",
"version": "0.39.5",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -17,10 +17,10 @@
"dependencies": {
"@antfu/eslint-config-basic": "workspace:*",
"@antfu/eslint-config-ts": "workspace:*",
"eslint-plugin-vue": "^9.11.0",
"eslint-plugin-vue": "^9.14.0",
"local-pkg": "^0.4.3"
},
"devDependencies": {
"eslint": "^8.38.0"
"eslint": "^8.41.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config",
"version": "0.39.1",
"version": "0.39.5",
"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.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsonc": "^2.7.0",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-jsonc": "^2.8.0",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-vue": "^9.11.0",
"eslint-plugin-yml": "^1.5.0",
"jsonc-eslint-parser": "^2.2.0",
"yaml-eslint-parser": "^1.2.0"
"eslint-plugin-unicorn": "^47.0.0",
"eslint-plugin-vue": "^9.14.0",
"eslint-plugin-yml": "^1.7.0",
"jsonc-eslint-parser": "^2.3.0",
"yaml-eslint-parser": "^1.2.2"
},
"devDependencies": {
"eslint": "^8.38.0"
"eslint": "^8.41.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-antfu",
"version": "0.39.1",
"version": "0.39.5",
"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.59.0"
"@typescript-eslint/utils": "^5.59.7"
},
"devDependencies": {
"@types/node": "^18.15.11",
"@types/node": "^20.2.3",
"unbuild": "^1.2.1",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}

665
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff