-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.additional-rules.cjs
73 lines (66 loc) · 2 KB
/
.eslintrc.additional-rules.cjs
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
module.exports = {
rules: {
camelcase: 'error',
'comma-dangle': ['error', 'always-multiline'],
'object-curly-spacing': ['error', 'always'],
'arrow-parens': ['error', 'always'],
'operator-linebreak': ['error', 'before'],
'no-underscore-dangle': ['error', { allow: ['_', '_id'] }],
// plain
radix: ['error', 'as-needed'],
'no-debugger': 'error',
'no-console': 'error',
'no-new': 'off',
'no-continue': 'off',
'no-await-in-loop': 'off',
'no-unused-vars': 'warn',
// safe
'prefer-destructuring': 'off',
'no-restricted-syntax': 'warn',
'class-methods-use-this': 'off',
'ts-nocheck': 'off',
// miss safe
'no-param-reassign': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-dynamic-require': 'off',
'import/no-cycle': 'off',
'global-require': 'off',
'max-classes-per-file': 'off',
// vue
'vue/comma-dangle': ['error', 'always-multiline'],
'vue/camelcase': 'error',
'vue/script-indent': ['error', 2, { baseIndent: 1, switchCase: 1 }],
// vue plain
'vue/no-unused-vars': 'warn',
// vue html
'vue/html-indent': ['error', 2],
'vue/html-quotes': ['error', 'double'],
'vue/html-self-closing': [
'error',
{
html: {
void: 'never',
normal: 'never',
component: 'never',
},
svg: 'always',
math: 'always',
},
],
'vue/no-boolean-default': 'off',
'vue/multi-word-component-names': 'off',
'vue/array-bracket-spacing': 'error',
'vue/arrow-spacing': 'error',
'vue/block-spacing': 'error',
'vue/brace-style': 'error',
'vue/component-name-in-template-casing': 'error',
'vue/eqeqeq': ['error', 'smart'],
'vue/key-spacing': 'error',
'vue/object-curly-spacing': ['error', 'always'],
'vue/space-infix-ops': 'error',
'vue/space-unary-ops': 'error',
'vue/v-on-function-call': 'error',
'vue/script-setup-uses-vars': 'error',
},
}