-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
executable file
·79 lines (77 loc) · 2.88 KB
/
eslint.config.js
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
// @ts-check
import eslint from '@eslint/js';
import tsEsLint from 'typescript-eslint';
import stylisticTs from '@stylistic/eslint-plugin';
import vueEsLint from 'eslint-plugin-vue';
import vueEsLintParser from 'vue-eslint-parser';
export default [
eslint.configs.recommended,
...tsEsLint.configs.recommended,
stylisticTs.configs['recommended-flat'],
...vueEsLint.configs['flat/recommended'],
{
ignores: ['**/*.vue'],
plugins: {
'@stylistic': stylisticTs,
},
rules: {
'semi': 'off',
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'@stylistic/semi': ['error', 'always'],
'@stylistic/comma-dangle': 'off',
'@stylistic/eol-last': 'off',
'@stylistic/quotes': ['warn', 'single'],
'@stylistic/indent': ['warn', 4],
'@stylistic/no-multiple-empty-lines': 'off',
'@stylistic/keyword-spacing': ['warn', { overrides: { for: { after: false }, switch: { after: false }, if: { after: false } } }],
'vue/max-attributes-per-line': 'off',
'vue/html-indent': ['warn', 4],
'vue/singleline-html-element-content-newline': 'off',
'vue/script-indent': ['error', 4, {
baseIndent: 1,
switchCase: 1,
ignores: []
}]
},
languageOptions: {
parser: vueEsLintParser,
parserOptions: {
parser: tsEsLint.parser,
EXPERIMENTAL_useProjectService: true
}
}
},
{
files: ['**/*.vue'],
plugins: {
'@stylistic': stylisticTs,
},
rules: {
'semi': 'off',
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'@stylistic/semi': ['error', 'always'],
'@stylistic/comma-dangle': 'off',
'@stylistic/eol-last': 'off',
'@stylistic/quotes': ['warn', 'single'],
'@stylistic/indent': 'off',
'@stylistic/no-multiple-empty-lines': 'off',
'@stylistic/keyword-spacing': ['warn', { overrides: { for: { after: false }, switch: { after: false }, if: { after: false } } }],
'vue/no-mutating-props': 'off',
'vue/max-attributes-per-line': 'off',
'vue/html-indent': ['warn', 4],
'vue/singleline-html-element-content-newline': 'off',
'vue/script-indent': ['error', 4, {
baseIndent: 1,
switchCase: 1,
ignores: []
}]
},
languageOptions: {
parser: vueEsLintParser,
parserOptions: {
parser: tsEsLint.parser,
EXPERIMENTAL_useProjectService: true
}
}
}
];