-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.cjs
88 lines (88 loc) · 2.02 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
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
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['plugin:vue/vue3-strongly-recommended', 'airbnb-base', 'prettier'],
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaFeatures: {
tsx: true,
jsx: true,
},
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
plugins: ['vue', '@typescript-eslint', 'prettier'],
settings: {
'import/resolver': {
typescript: {},
},
},
rules: {
'max-classes-per-file': ['error', 5],
'import/no-extraneous-dependencies': 'off',
'import/extensions': [
'error',
'ignorePackages',
{ js: 'never', jsx: 'never', ts: 'never', tsx: 'never' },
],
'no-bitwise': 'off',
'no-param-reassign': 'off',
'no-debugger': 'off',
'vue/multi-word-component-names': 'off',
'vue/attribute-hyphenation': 'off',
'import/prefer-default-export': 'off',
'no-promise-executor-return': 'off',
'no-shadow': 'off',
'no-unused-vars': 'off',
'no-unused-expressions': 'off',
'class-methods-use-this': 'off',
'no-console': 'off',
'no-nested-ternary': 'off',
'@typescript-eslint/no-unused-vars': ['warn'],
'vue/attributes-order': [
'error',
{
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
['UNIQUE', 'SLOT'],
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'OTHER_ATTR',
'EVENTS',
'CONTENT',
],
alphabetical: false,
},
],
'vue/v-on-event-hyphenation': [
'error',
'always',
{
autofix: true,
ignore: [],
},
],
'vue/html-closing-bracket-newline': [
'error',
{
singleline: 'never',
multiline: 'always',
},
],
},
}