-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
63 lines (59 loc) · 1.75 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
var DISABLE_DEV_NO_UNUSED_VARS = false
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
"globals": {
// "document": false,
// "escape": false,
// "navigator": false,
// "unescape": false,
// "window": false,
"describe": true,
"before": true,
"it": true,
"expect": true,
"sinon": true
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
],
// add your custom rules here
'rules': {
"import/first": [0],
// Override our default settings just for this directory
"eqeqeq": 0,
// allow paren-less arrow functions
'arrow-parens': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
// allows the opening and closing braces for a block to be on the same line
// 'allowSingleLine': 0,
// http://eslint.org/docs/rules/brace-style
'brace-style': [
'error',
// 'stroustrup', 'allman'
'1tbs',
{ "allowSingleLine": true }
],
"camelcase": [0, {"properties": "never"}],
// close no-unused-vars when debug
"no-unused-vars": [process.env.NODE_ENV === 'production' && DISABLE_DEV_NO_UNUSED_VARS ? 2 : 0],
"one-var": [0],
"indent": ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 }, "SwitchCase": 1 }],
// forbid no multiple spaces except property of object, variable-declaration and import-declaration
"no-multi-spaces": ["error", {
exceptions: {
"Property": true,
"VariableDeclarator": true,
"ImportDeclaration": true
},
}],
"no-useless-escape": [0]
}
}