This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
66 lines (66 loc) · 1.58 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
module.exports = {
root: true,
env: {
node: true,
},
'extends': [
'plugin:vue/recommended',
'@vue/standard',
],
rules: {
// Allow async-await
'generator-star-spacing': 'off',
// No async function without await
'require-await': 'error',
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
// Prefer const over let
'prefer-const': ['error', {
'destructuring': 'any',
'ignoreReadBeforeAssign': false,
}],
// No single if in an 'else' block
'no-lonely-if': 'error',
// Force curly braces for control flow, including if blocks with a single statement
curly: ['error', 'all'],
// Force dot notation when possible
'dot-notation': 'error',
'no-var': 'error',
'comma-dangle': ['error', 'always-multiline'],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'vue/max-attributes-per-line': [
'error',
{
singleline: 2,
multiline: {
max: 1,
allowFirstLine: false,
},
},
],
'vue/component-name-in-template-casing': [
'error',
'kebab-case',
{
ignores: [],
},
],
'vue/html-indent': [
'error',
2,
{
attribute: 1,
baseIndent: 0,
closeBracket: 0,
alignAttributesVertically: true,
ignores: [],
},
],
'vue/no-parsing-error': ['error', {
'x-invalid-end-tag': false,
}],
},
parserOptions: {
parser: 'babel-eslint',
},
}