-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
47 lines (46 loc) · 1.6 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
module.exports = {
extends: [
'plugin:eslint-plugin/recommended',
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 'latest',
},
rules: {
indent: ['error', 4],
quotes: ['error', 'single'],
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
// enforce spacing before and after comma
'comma-spacing': ['error', { before: false, after: true }],
// enforce one true comma style
'comma-style': ['error', 'last', {
exceptions: {
ArrayExpression: false,
ArrayPattern: false,
ArrowFunctionExpression: false,
CallExpression: false,
FunctionDeclaration: false,
FunctionExpression: false,
ImportDeclaration: false,
ObjectExpression: false,
ObjectPattern: false,
VariableDeclaration: false,
NewExpression: false,
},
}],
// enforce newline at the end of file, with no multiple empty lines
'eol-last': ['error', 'always'],
// require or disallow use of semicolons instead of ASI
semi: ['error', 'always'],
// enforce spacing before and after semicolons
'semi-spacing': ['error', { before: false, after: true }],
// disallow unnecessary semicolons
'no-extra-semi': 'error',
},
};