-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
141 lines (141 loc) · 3.74 KB
/
.eslintrc.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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/vue3-essential',
'airbnb-base',
'plugin:@typescript-eslint/recommended',
],
plugins: ['fp', '@typescript-eslint'],
ignorePatterns: [
'build/**/*',
'dist/**/*',
],
globals: {
document: true,
window: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/*.spec.{j,t}s?(x)',
'**/*.test.{j,t}s?(x)',
],
env: {
jest: true,
},
},
],
settings: {
'import/resolver': {
typescript: {},
},
},
rules: {
'no-console': 1,
'no-extra-boolean-cast': 0,
'max-params': ['error', 3],
'arrow-parens': 'error',
'consistent-return': 'off',
indent: ['error', 2, { SwitchCase: 1 }],
'func-names': ['error', 'as-needed'],
curly: ['error', 'all'],
'max-len': 'off',
semi: ['error', 'always'],
'object-curly-newline': ['error', {
ObjectExpression: { consistent: true },
ObjectPattern: 'never',
}],
'no-plusplus': 'off',
'require-await': 'error',
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 'off',
'import/no-cycle': 'off',
'import/group-exports': 'error',
'import/exports-last': 'error',
'import/prefer-default-export': 'off',
'import/order': ['error', {
'newlines-between': 'always',
groups: [['builtin', 'external'], ['internal', 'parent', 'sibling', 'index']],
}],
'fp/no-class': 'error',
'fp/no-delete': 'error',
'fp/no-get-set': 'error',
'vue/no-shared-component-data': 'error',
'vue/no-side-effects-in-computed-properties': 'error',
'vue/no-unused-components': 'error',
'vue/no-unused-vars': 'error',
'vue/require-v-for-key': 'error',
'vue/require-valid-default-prop': 'error',
'vue/return-in-computed-property': 'error',
'vue/script-setup-uses-vars': 'warn',
'vue/valid-v-bind': 'error',
'vue/valid-v-for': 'error',
'vue/valid-v-html': 'error',
'vue/valid-v-if': 'error',
'vue/valid-v-show': 'error',
'vue/valid-v-model': 'error',
'vue/attribute-hyphenation': 'error',
"vue/first-attribute-linebreak": ["error", {
"singleline": "ignore",
"multiline": "beside"
}],
'vue/html-closing-bracket-newline': 'error',
'vue/html-closing-bracket-spacing': ['error', {
startTag: 'never',
endTag: 'never',
selfClosingTag: 'never',
}],
'vue/html-end-tags': 'error',
'vue/html-indent': ['error', 2, {
alignAttributesVertically: true,
}],
'vue/html-quotes': ['error', 'double'],
'vue/html-self-closing': 'error',
"vue/max-attributes-per-line": ["error", {
"singleline": 5,
"multiline": 1
}],
'vue/multiline-html-element-content-newline': 'error',
'vue/mustache-interpolation-spacing': 'error',
'vue/no-multi-spaces': 'error',
'vue/prop-name-casing': 'error',
'vue/v-bind-style': 'error',
'vue/v-on-style': 'error',
'vue/attributes-order': ['error', {
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
'UNIQUE',
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'OTHER_ATTR',
'CONTENT',
'EVENTS',
],
}],
'vue/no-confusing-v-for-v-if': 'error',
'vue/this-in-template': 'error',
'vue/component-name-in-template-casing': 'error',
'vue/component-tags-order': ['error', {
order: [
'template',
'script',
'style',
],
}],
'vue/v-on-function-call': 'error',
'vue/valid-v-slot': 'error',
},
};