-
Notifications
You must be signed in to change notification settings - Fork 113
/
eslint.config.mjs
68 lines (67 loc) · 1.57 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
import base from 'eslint-config-rchl-base'
import typescript from 'eslint-config-rchl-typescript'
import vue from 'eslint-config-rchl-vue'
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: [
'**/.nuxt/',
'**/dist/',
'**/templates/',
'node_modules/',
],
},
...base,
...typescript,
...vue,
{
rules: {
'@stylistic/indent': [
'error', 2, {
SwitchCase: 1,
},
],
'@stylistic/semi': ['error', 'never'],
'@stylistic/space-before-function-paren': ['error', 'always'],
},
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@stylistic/ts/indent': [
'error', 2, {
SwitchCase: 1,
FunctionDeclaration: { parameters: 'first' },
FunctionExpression: { parameters: 'first' },
CallExpression: { arguments: 'first' },
},
],
'@stylistic/ts/member-delimiter-style': [
'error', {
multiline: {
delimiter: 'none',
},
},
],
'@stylistic/ts/semi': ['error', 'never'],
'@stylistic/ts/space-before-function-paren': ['error', 'always'],
},
},
{
files: ['**/*.vue'],
rules: {
'vue/html-indent': ['error', 2],
'vue/script-indent': ['error', 2, { switchCase: 1 }],
},
},
{
files: ['**/.nuxt/*.js'],
rules: {
'@stylistic/comma-spacing': 'off',
'@stylistic/key-spacing': 'off',
'@stylistic/object-curly-spacing': 'off',
'@stylistic/quote-props': 'off',
'@stylistic/quotes': 'off',
},
},
]