chore: 添加 @eslint/js、globals 依赖
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
dist
|
||||
node_modules
|
||||
types/env.d.ts
|
||||
types/web.d.ts
|
||||
@@ -1,21 +0,0 @@
|
||||
/* eslint-env node */
|
||||
module.exports = {
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:vue/vue3-essential',
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
ecmaVersion: 'latest',
|
||||
},
|
||||
root: true,
|
||||
rules: {
|
||||
'vue/html-self-closing': 'off',
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
import js from '@eslint/js';
|
||||
import pluginVue from 'eslint-plugin-vue';
|
||||
import globals from 'globals';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: [
|
||||
'dist/**',
|
||||
'node_modules/**',
|
||||
'types/env.d.ts',
|
||||
'types/web.d.ts',
|
||||
],
|
||||
},
|
||||
js.configs.recommended,
|
||||
...pluginVue.configs['flat/essential'],
|
||||
{
|
||||
files: ['**/*.{vue,js,jsx,cjs,mjs}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
'vue/html-self-closing': 'off',
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
+3
-1
@@ -9,7 +9,7 @@
|
||||
"dev-host": "vite dev --host 0.0.0.0",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
|
||||
"lint": "eslint . --fix"
|
||||
},
|
||||
"packageManager": "pnpm@10.11.0",
|
||||
"dependencies": {
|
||||
@@ -30,6 +30,7 @@
|
||||
"zxing-wasm": "^2.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.28.0",
|
||||
"@tsconfig/node20": "^20.1.5",
|
||||
"@types/node": "^20.17.57",
|
||||
"@types/uuid": "^10.0.0",
|
||||
@@ -40,6 +41,7 @@
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-plugin-vue": "^9.33.0",
|
||||
"globals": "^17.11.0",
|
||||
"less": "^4.3.0",
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
|
||||
Generated
+12
@@ -54,6 +54,9 @@ importers:
|
||||
specifier: ^2.1.2
|
||||
version: 2.1.2(@types/emscripten@1.40.1)
|
||||
devDependencies:
|
||||
'@eslint/js':
|
||||
specifier: ^9.28.0
|
||||
version: 9.28.0
|
||||
'@tsconfig/node20':
|
||||
specifier: ^20.1.5
|
||||
version: 20.1.5
|
||||
@@ -84,6 +87,9 @@ importers:
|
||||
eslint-plugin-vue:
|
||||
specifier: ^9.33.0
|
||||
version: 9.33.0(eslint@9.28.0)
|
||||
globals:
|
||||
specifier: ^17.11.0
|
||||
version: 17.11.0
|
||||
less:
|
||||
specifier: ^4.3.0
|
||||
version: 4.3.0
|
||||
@@ -1437,6 +1443,10 @@ packages:
|
||||
resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
globals@17.11.0:
|
||||
resolution: {integrity: sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
gopd@1.2.0:
|
||||
resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -3416,6 +3426,8 @@ snapshots:
|
||||
|
||||
globals@14.0.0: {}
|
||||
|
||||
globals@17.11.0: {}
|
||||
|
||||
gopd@1.2.0: {}
|
||||
|
||||
graceful-fs@4.2.11:
|
||||
|
||||
Reference in New Issue
Block a user