-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.cjs
59 lines (57 loc) · 1.52 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
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
'vue/setup-compiler-macros': true,
},
extends: [
'plugin:vue/vue3-essential',
'airbnb-base',
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'vue',
],
rules: {
'import/first': 'off',
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-dynamic-require': 'off',
'import/prefer-default-export': 'off',
'prefer-promise-reject-errors': 'off',
// allow console.log during development only
'no-console': process.env.NODE_ENV === 'production' ? ['error', { allow: ['info', 'warn', 'error'] }] : 'off',
// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'linebreak-style': 'off',
'arrow-parens': ['error', 'always'],
'max-len': 'off',
'template-curly-spacing': ['error', 'always'],
'no-underscore-dangle': 'off',
'no-var': 'error',
'no-param-reassign': ['error', { props: false }],
indent: 'off',
'indent-legacy': ['error', 2, {
SwitchCase: 1,
}],
'vue/script-indent': ['error', 2, {
baseIndent: 0,
switchCase: 1,
ignores: [],
}],
'vue/max-attributes-per-line': ['error', {
singleline: 3,
multiline: 1,
}],
},
};