-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
82 lines (79 loc) · 2.08 KB
/
eslint.config.mjs
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import { defineFlatConfigs } from '@nuxt/eslint-config/flat'
import eslintConfigPrettier from 'eslint-config-prettier'
import prettier from 'eslint-plugin-prettier'
import vue from 'eslint-plugin-vue'
import typescript from '@typescript-eslint/eslint-plugin'
export default defineFlatConfigs(eslintConfigPrettier, {
plugins: {
prettier,
vue,
'@typescript-eslint': typescript,
},
rules: {
'vue/multi-word-component-names': [
'error',
{
ignores: ['default', 'index'],
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'vue/valid-v-slot': ['error', { allowModifiers: true }],
'@typescript-eslint/no-explicit-any': 'warn',
'logical-assignment-operators': ['error', 'always'],
'prefer-const': 1,
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'no-console': 'error',
'no-alert': 'warn',
'no-debugger': 'warn',
'vue/require-default-prop': 0,
'vue/html-indent': 'off',
'vue/singleline-html-element-content-newline': 0,
'no-unused-vars': 'off',
'vue/no-v-html': 'warn',
'prettier/prettier': [
'error',
{
arrowParens: 'avoid',
bracketSpacing: true,
endOfLine: 'lf',
bracketSameLine: false,
jsxSingleQuote: false,
printWidth: 120,
proseWrap: 'preserve',
quoteProps: 'as-needed',
semi: false,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: false,
},
],
},
ignores: [
'node_modules/*',
'dist/**/*', // Ensure this matches your destination folder's path
'out',
'coverage',
'test',
'tests/**/*',
'cypress',
'tmp',
'temp',
'public',
'static',
'docs/**/*',
'**/cache/**/*', // Ensure this matches your cache folder's path
'docs/.vitepress/cache/*',
'**/dist/**/*',
'packages/vue/dist/*',
'**/.*',
],
})