-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.js
79 lines (64 loc) · 1.7 KB
/
index.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
module.exports = {
env: {
browser: true,
node: true,
'jest/globals': true
},
extends: [
'standard',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:vue/recommended'
],
plugins: [
'vue',
'jest'
],
settings: {
'import/resolver': {
node: { extensions: ['.js', '.mjs'] }
}
},
rules: {
// Enforce import order
'import/order': 2,
// Imports should come first
'import/first': 2,
// Other import rules
'import/no-mutable-exports': 2,
// Allow unresolved imports
'import/no-unresolved': 0,
// Allow paren-less arrow functions only when there's no braces
'arrow-parens': [2, 'as-needed', { requireForBlockBody: true }],
// Allow async-await
'generator-star-spacing': 0,
// Allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'no-console': process.env.NODE_ENV === 'production' ? 2 : 0,
// Prefer const over let
'prefer-const': [2, {
'destructuring': 'any',
'ignoreReadBeforeAssign': false
}],
// No single if in an "else" block
'no-lonely-if': 2,
// Force curly braces for control flow,
// including if blocks with a single statement
curly: [2, 'all'],
// No async function without await
'require-await': 2,
// Force dot notation when possible
'dot-notation': 2,
'no-var': 2,
// Force object shorthand where possible
'object-shorthand': 2,
// No useless destructuring/importing/exporting renames
'no-useless-rename': 2,
'vue/no-parsing-error': [2, {
'x-invalid-end-tag': false
}],
'vue/max-attributes-per-line': [2, {
'singleline': 5
}]
}
}