-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy patheslint.config.mjs
More file actions
97 lines (95 loc) · 2.71 KB
/
eslint.config.mjs
File metadata and controls
97 lines (95 loc) · 2.71 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import antfu from '@antfu/eslint-config'
export default antfu(
{
type: 'app',
typescript: true,
vue: true,
jsonc: false,
yaml: false,
stylistic: {
indent: 4,
quotes: 'single',
semi: false,
},
ignores: [
'build/**',
'dist/**',
'static/**',
'src/lib/reporters/**',
'src/lib/process/debug/**',
'src/types/**',
'tests/playwright/**',
],
},
{
languageOptions: {
globals: {
__ANALYTICS_ID__: 'readonly',
__CRASH_URL__: 'readonly',
__DARWIN__: 'readonly',
__DEV__: 'readonly',
__LINUX__: 'readonly',
__LOGGER__: 'readonly',
__SILENT__: 'readonly',
__static: 'readonly',
__WIN32__: 'readonly',
Buffer: 'readonly',
Electron: 'readonly',
ILogger: 'readonly',
ITracker: 'readonly',
Lode: 'readonly',
log: 'readonly',
MenuEvent: 'readonly',
NodeJS: 'readonly',
track: 'readonly',
afterAll: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
beforeEach: 'readonly',
context: 'readonly',
describe: 'readonly',
expect: 'readonly',
it: 'readonly',
test: 'readonly',
vi: 'readonly',
},
},
},
{
rules: {
'no-console': 'off',
'node/prefer-global/process': 'off',
'vue/no-v-html': 'off',
'unused-imports/no-unused-vars': ['error', {
vars: 'all',
args: 'none',
caughtErrors: 'none',
varsIgnorePattern: '^_',
}],
'ts/no-unused-vars': 'off',
'no-unused-vars': 'off',
'ts/no-require-imports': 'off',
'ts/no-empty-function': 'off',
'ts/no-inferrable-types': 'off',
curly: ['error', 'all'],
'style/quote-props': ['error', 'as-needed'],
},
},
{
files: ['**/*.vue'],
rules: {
'vue/html-indent': ['error', 4],
'vue/html-self-closing': ['error', {
html: { void: 'never', normal: 'any', component: 'always' },
svg: 'always',
math: 'always',
}],
},
},
{
files: ['**/*.js'],
rules: {
'no-undef': 'error',
},
},
)