-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
51 lines (50 loc) · 1.2 KB
/
.eslintrc.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
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting',
],
plugins: [
'import',
],
parserOptions: {
ecmaVersion: 'latest'
},
rules: {
'indent': ['error', 'tab', { SwitchCase: 1 }],
'no-case-declarations': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'vue/no-unused-vars': ['error', { 'ignorePattern': '^_' }],
'no-undef': 'off', // ESLint whines about unknown globals, but TSC already checks those so who needs ESLint's checking?
'vue/multi-word-component-names': 'off',
'import/order': ['error', {
groups: [
'builtin',
'external',
'parent',
'sibling',
'index',
],
pathGroups: [
{
pattern: '@/**',
group: 'external',
position: 'after'
}
],
pathGroupsExcludedImportTypes: ['builtin'],
alphabetize: {
'order': 'asc',
},
'newlines-between': 'always',
}],
'sort-imports': ['error', {
allowSeparatedGroups: true,
ignoreDeclarationSort: true,
}]
},
}