-
Notifications
You must be signed in to change notification settings - Fork 556
Expand file tree
/
Copy patheslint.config.js
More file actions
64 lines (60 loc) · 2.06 KB
/
eslint.config.js
File metadata and controls
64 lines (60 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
import vueParser from 'vue-eslint-parser'
export default [
{
ignores: [
'node_modules/**',
'docs/.vitepress/dist/**',
'docs/.vitepress/cache/**'
]
},
js.configs.recommended,
...pluginVue.configs['flat/recommended'],
{
files: ['**/*.vue', '**/*.js', '**/*.ts'],
languageOptions: {
parser: vueParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: false
}
}
},
rules: {
// Important Vue rules - keep as errors
'vue/no-ref-as-operand': 'error',
'vue/no-template-shadow': 'error',
'vue/require-v-for-key': 'error',
'vue/no-use-v-if-with-v-for': 'error',
'vue/no-mutating-props': 'error',
'vue/return-in-computed-property': 'error',
'vue/no-side-effects-in-computed-properties': 'error',
'vue/no-async-in-computed-properties': 'error',
'no-undef': 'error',
// Relaxed rules - warnings or off
'vue/no-setup-props-destructure': 'warn',
'vue/require-valid-default-prop': 'off',
'no-unused-vars': 'warn',
// Disable formatting rules (handled by Prettier)
'vue/max-attributes-per-line': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-self-closing': 'off',
'vue/html-indent': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/first-attribute-linebreak': 'off',
// Other Vue rules
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off', // v-html is common in docs
'no-case-declarations': 'off', // Too strict for demo code
'no-control-regex': 'off', // Terminal codes need this
'no-useless-escape': 'warn', // Sometimes needed for clarity
'no-dupe-keys': 'error', // Real issue
'no-prototype-builtins': 'warn', // Common in demo code
'no-dupe-else-if': 'warn', // Sometimes intentional
'no-async-promise-executor': 'warn' // Common pattern in demo code
}
}
]