-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
111 lines (106 loc) · 2.64 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
module.exports = {
env: {
es6: true,
node: true,
mocha: true,
browser: true,
},
extends: ['eslint:recommended', 'plugin:vue/recommended', 'prettier'],
globals: {
expect: true,
window: true,
document: true,
},
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
ecmaFeatures: {
impliedStrict: true,
},
},
plugins: ['standard', 'promise'],
overrides: [
{
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
env: {
jest: true,
},
},
],
ignorePatterns: ['/public/**/*'],
rules: {
'no-debugger': 'warn',
'array-bracket-newline': ['error', 'consistent'],
'comma-dangle': ['warn', 'always-multiline'],
'eol-last': ['error', 'always'],
indent: ['error', 2, { MemberExpression: 1, SwitchCase: 1 }],
'max-len': ['warn', 140, { ignoreUrls: true, ignoreStrings: true, ignoreComments: true }],
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 3 }],
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-extra-boolean-cast': 'warn',
'no-multiple-empty-lines': [2, { max: 2, maxEOF: 1 }],
'no-unused-vars': [
'error',
{
vars: 'all',
ignoreRestSiblings: false,
args: 'none',
},
],
'object-curly-newline': [
'error',
{
ObjectExpression: {
consistent: true,
multiline: true,
},
ObjectPattern: {
consistent: true,
multiline: true,
},
ImportDeclaration: {
consistent: true,
multiline: true,
},
ExportDeclaration: {
consistent: true,
multiline: true,
},
},
],
'object-curly-spacing': ['error', 'always'],
'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
'object-shorthand': ['error', 'always'],
'prefer-const': ['error', { destructuring: 'any', ignoreReadBeforeAssign: false }],
quotes: ['error', 'single'],
semi: ['error', 'never'],
strict: 2,
curly: 'error',
'valid-typeof': 'error',
eqeqeq: ['error', 'always', { null: 'ignore' }],
'vue/max-attributes-per-line': [
1,
{
singleline: 10,
multiline: {
max: 1,
allowFirstLine: false,
},
},
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
'vue/no-v-html': 0,
'vue/singleline-html-element-content-newline': 0,
},
}