-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.mjs
66 lines (64 loc) · 1.68 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
// @ts-check
/// <reference path="./eslint-typegen.d.ts" />
import antfu from '@antfu/eslint-config';
import typegen from 'eslint-typegen';
import pluginSecurity from 'eslint-plugin-security';
import pluginVueHookOptimizer from 'eslint-plugin-vue-hook-optimizer';
export default typegen(antfu({
typescript: true,
}, [
{
ignores: [
'fixtures/**/*',
'test/output/**/*',
'public/**/*',
'components/ui/**/*',
],
},
pluginSecurity.configs.recommended,
{
plugins: {
'vue-hook-optimizer': pluginVueHookOptimizer,
},
rules: {
'vue-hook-optimizer/not-used': ['warn', {
framework: 'vue',
}],
'vue-hook-optimizer/loop-call': ['warn', {
framework: 'vue',
}],
'vue-hook-optimizer/linear-path': ['warn', {
framework: 'vue',
}],
},
},
{
rules: {
'curly': ['error', 'all'],
'style/brace-style': 'error',
'style/multiline-ternary': ['error', 'always'],
'unused-imports/no-unused-imports': 'off',
'unused-imports/no-unused-vars': [
'warn',
{ args: 'after-used', argsIgnorePattern: '^_', vars: 'all', varsIgnorePattern: '^_' },
],
'no-console': ['warn'],
'style/semi': ['error', 'always'],
'style/indent': ['error', 2, { SwitchCase: 1 }],
'style/max-len': [
'error',
{
code: 120,
tabWidth: 2,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreUrls: true,
ignoreTemplateLiterals: true,
ignoreComments: true,
},
],
'comma-dangle': ['error', 'always-multiline'],
'style/quotes': ['error', 'single'],
},
},
]));