chore: 添加 @eslint/js、globals 依赖

This commit is contained in:
2026-11-30 14:55:38 +08:00
parent de741e370f
commit 768eb8069a
5 changed files with 54 additions and 26 deletions
+39
View File
@@ -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',
},
},
];