-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
114 lines (111 loc) · 3.17 KB
/
eslint.config.js
File metadata and controls
114 lines (111 loc) · 3.17 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import globals from 'globals'
import pluginJs from '@eslint/js'
import pluginTs from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{
languageOptions: {
globals: {
ymaps3: true,
...globals.browser,
...globals.node,
},
},
rules: {
'brace-style': ['error', '1tbs', {
allowSingleLine: true,
}],
'comma-dangle': ['error', {
arrays: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
imports: 'always-multiline',
objects: 'always-multiline',
}],
'eqeqeq': ['error', 'always'],
'indent': ['error', 2, {
ignoreComments: true,
SwitchCase: 1,
}],
'keyword-spacing': ['error', {
before: true,
after: true,
overrides: {
catch: { before: true, after: true },
},
}],
'linebreak-style': [2, 'unix'],
'no-debugger': 'error',
'no-empty': 'off',
'no-multiple-empty-lines': ['error', {
max: 1,
maxBOF: 0,
maxEOF: 0,
}],
'no-new-wrappers': 'error',
'no-prototype-builtins': 'error',
'no-shadow-restricted-names': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': ['error'],
'no-unsafe-optional-chaining': 'off',
'no-useless-escape': 'off',
'object-curly-spacing': ['error', 'always'],
'padded-blocks': ['error', 'never'],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'space-infix-ops': ['error', { 'int32Hint': false }],
'@typescript-eslint/consistent-type-imports': ['error', {
prefer: 'type-imports',
fixStyle: 'separate-type-imports',
}],
'@typescript-eslint/naming-convention': 'off',
},
},
pluginJs.configs.recommended,
...pluginTs.configs.recommended,
...pluginVue.configs['flat/essential'],
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: { parser: pluginTs.parser },
},
rules: {
'vue/attributes-order': 'error',
'vue/component-definition-name-casing': ['error', 'PascalCase'],
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'vue/first-attribute-linebreak': 'error',
'vue/html-closing-bracket-newline': ['error', {
multiline: 'always',
singleline: 'never',
}],
'vue/html-closing-bracket-spacing': 'error',
'vue/html-indent': ['error', 4, {
attribute: 1,
closeBracket: 0,
alignAttributesVertically: true,
ignores: [],
}],
'vue/html-self-closing': ['error', {
html: {
component: 'always',
normal: 'always',
void: 'always',
},
math: 'always',
svg: 'always',
}],
'vue/no-required-prop-with-default': 'error',
'vue/max-attributes-per-line': ['error', {
singleline: 4,
multiline: {
max: 1,
},
}],
'vue/one-component-per-file': 'off',
'indent': ['error', 2, { ignoreComments: true, SwitchCase: 1 }],
},
},
{ ignores: ['dist/*'] },
{ ignores: ['**/dist/*'] },
]