This repository has been archived by the owner on Jul 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.js
61 lines (56 loc) · 1.63 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
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/vue3-recommended',
'@vue/standard'
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// Custom rules below
'vue/singleline-html-element-content-newline': 'off',
'vue/html-closing-bracket-spacing': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/no-template-shadow': 'off',
'no-multiple-empty-lines': 0,
'no-trailing-spaces': process.env.NODE_ENV === 'production' ? 'warn' : 'warn',
'space-before-function-paren': ['error', {
anonymous: 'always',
named: 'always',
asyncArrow: 'always'
}],
'prefer-const': process.env.NODE_ENV === 'production' ? 'error' : 'error',
'padded-blocks': process.env.NODE_ENV === 'production' ? 'warn' : 'warn',
'comma-dangle': 0,
'no-unused-vars': process.env.NODE_ENV === 'production' ? 'warn' : 'warn',
'vue/no-unused-vars': process.env.NODE_ENV === 'production' ? 'error' : 'error',
'vue/no-unused-components': process.env.NODE_ENV === 'production' ? 'error' : 'error',
'vue/max-attributes-per-line': ['error', {
singleline: 4,
multiline: {
max: 4,
allowFirstLine: true
}
}],
'no-extra-semi': 'warn',
'vue/no-mutating-props': 'off',
'vue/no-v-html': 'off'
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
}