Improve eslint

next
neobooru 2023-02-05 01:09:52 +01:00
parent f57166fbc0
commit b07cf788c9
3 changed files with 28 additions and 22 deletions

View File

@ -1,23 +1,26 @@
module.exports = { module.exports = {
"env": { env: {
"browser": true, browser: true,
"es2021": true es2021: true,
}, },
"extends": [ extends: ["eslint:recommended", "plugin:vue/vue3-essential", "plugin:@typescript-eslint/recommended"],
"eslint:recommended", parser: "vue-eslint-parser",
"plugin:vue/vue3-essential", parserOptions: {
"plugin:@typescript-eslint/recommended" ecmaVersion: "latest",
], parser: "@typescript-eslint/parser",
"parserOptions": { sourceType: "module",
"ecmaVersion": "latest",
"parser": "@typescript-eslint/parser",
"sourceType": "module"
}, },
"plugins": [ plugins: ["vue", "@typescript-eslint"],
"vue", rules: {
"@typescript-eslint"
],
"rules": {
semi: ["error", "always"], semi: ["error", "always"],
} "no-undef": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
},
}; };

View File

@ -49,7 +49,7 @@
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"crx": "^5.0.1", "crx": "^5.0.1",
"eslint": "^8.28.0", "eslint": "^8.32.0",
"eslint-plugin-vue": "^9.9.0", "eslint-plugin-vue": "^9.9.0",
"esno": "^0.16.3", "esno": "^0.16.3",
"fs-extra": "^10.1.0", "fs-extra": "^10.1.0",
@ -64,6 +64,7 @@
"vite": "^3.2.4", "vite": "^3.2.4",
"vitest": "^0.25.3", "vitest": "^0.25.3",
"vue": "^3.2.45", "vue": "^3.2.45",
"vue-eslint-parser": "^9.1.0",
"web-ext": "^7.5.0", "web-ext": "^7.5.0",
"webextension-polyfill": "^0.10.0" "webextension-polyfill": "^0.10.0"
} }

View File

@ -19,7 +19,7 @@ specifiers:
chokidar: ^3.5.3 chokidar: ^3.5.3
cross-env: ^7.0.3 cross-env: ^7.0.3
crx: ^5.0.1 crx: ^5.0.1
eslint: ^8.28.0 eslint: ^8.32.0
eslint-plugin-vue: ^9.9.0 eslint-plugin-vue: ^9.9.0
esno: ^0.16.3 esno: ^0.16.3
fs-extra: ^10.1.0 fs-extra: ^10.1.0
@ -37,6 +37,7 @@ specifiers:
vite: ^3.2.4 vite: ^3.2.4
vitest: ^0.25.3 vitest: ^0.25.3
vue: ^3.2.45 vue: ^3.2.45
vue-eslint-parser: ^9.1.0
web-ext: ^7.5.0 web-ext: ^7.5.0
webextension-polyfill: ^0.10.0 webextension-polyfill: ^0.10.0
@ -79,6 +80,7 @@ devDependencies:
vite: 3.2.5_ovmyjmuuyckt3r3gpaexj2onji vite: 3.2.5_ovmyjmuuyckt3r3gpaexj2onji
vitest: 0.25.8_jsdom@20.0.3+sass@1.57.1 vitest: 0.25.8_jsdom@20.0.3+sass@1.57.1
vue: 3.2.45 vue: 3.2.45
vue-eslint-parser: 9.1.0_eslint@8.32.0
web-ext: 7.5.0 web-ext: 7.5.0
webextension-polyfill: 0.10.0 webextension-polyfill: 0.10.0