-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
73 lines (73 loc) · 2.01 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
jest: true
},
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
ecmaVersion: 2020
},
extends: ['plugin:vue/strongly-recommended', 'eslint-config-prettier', 'prettier', 'prettier/vue'],
plugins: ['prettier'],
rules: {
'prettier/prettier': [
'error',
{
endOfLine: 'crlf'
}
],
'max-len': [
'error',
{
code: 150,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}
],
'no-multiple-empty-lines': [2, { max: 2 }],
semi: ['error', 'never'],
'arrow-parens': ['error', 'as-needed'],
'vue/component-definition-name-casing': ['error', 'PascalCase'],
'vue/multi-word-component-names': 'off',
'vue/script-setup-uses-vars': 'off',
'no-extend-native': 'off',
'space-before-function-paren': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-param-reassign': [
'error',
{
props: false
}
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'any',
normal: 'always',
component: 'always'
},
svg: 'always',
math: 'always'
}
],
'vue/order-in-components': ['error'],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: '*', next: 'if' },
{ blankLine: 'always', prev: '*', next: 'switch' },
{ blankLine: 'always', prev: '*', next: 'for' },
{ blankLine: 'always', prev: '*', next: 'function' },
{ blankLine: 'never', prev: 'import', next: 'import' },
{ blankLine: 'always', prev: 'import', next: 'export' },
{ blankLine: 'always', prev: 'expression', next: 'export' },
{ blankLine: 'always', prev: 'import', next: 'expression' }
]
}
}