-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
70 lines (67 loc) · 1.58 KB
/
.eslintrc.json
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
{
"root": true,
"parser": "babel-eslint",
"env": {
"node": true
},
"extends": [
"walmart/configurations/es6-node"
],
"parserOptions": {
"sourceType": "module"
},
"plugins": [
"filenames"
],
"rules": {
//additional rules
"strict": [2, "never"],
"indent": [2, 4, {
"SwitchCase": 1
}],
"linebreak-style": [2, "unix"],
"semi": [2, "always"],
"require-jsdoc": [2, {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": false
}
}],
"filenames/match-regex": [2, "^[a-z-.]+$"], //allows only kebab-like-names and names.with.parts, disallows camelCaseNames and snake_like_names
"filenames/match-exported": 0,
"filenames/no-index": 0,
//overridden
"max-len": [2, {
"code": 128,
"ignoreTrailingComments": true
}],
"comma-dangle": [2, "never"],
"no-cond-assign": [2, "always"],
"quotes": [2, "single"],
"one-var": [2, "always"],
"no-magic-numbers": [2, {
"ignore": [0, 1, 100, 1000],
"ignoreArrayIndexes": true
}],
"dot-notation": [2, {
"allowPattern": "^([a-z]+(_[a-z]+)+|[_A-Z0-9]+)$" //allows keys (e.g): under_score, UPPERCASE, 123, _0
}],
"no-trailing-spaces": [2, {
"skipBlankLines": true
}],
"no-multi-spaces": [2, {
"exceptions": {
"VariableDeclarator": true
}
}],
//change level
"brace-style": [1, "stroustrup"],
"no-console": 1,
//disable
"curly": 0,
"valid-jsdoc": 0,
"max-params": 0,
"prefer-const": 0
}
}