forked from JetBrains/ring-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
62 lines (60 loc) · 1.39 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
module.exports = {
"parser": "babel-eslint",
"extends": [
"@jetbrains",
"@jetbrains/eslint-config/es6",
"@jetbrains/eslint-config/browser",
"@jetbrains/eslint-config/react",
"@jetbrains/eslint-config/angular",
"@jetbrains/eslint-config/test"
],
"rules": {
"valid-jsdoc": "off",
"import/no-commonjs": "off"
},
"env": {
"node": true
},
"overrides": [
{
"files": [
"components/**/*.js"
],
"env": {
"browser": true,
"mocha": false,
"node": false
},
"rules": {
// Best Practices
"complexity": ["off", 5],
"no-magic-numbers": ["error", {"ignore": [-1, 0, 1, 2]}],
// Stylistic Issues
"max-len": ["error", 100, {
"ignoreComments": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true,
// Strings longer than 40 symbols (half of standard max-len)
"ignorePattern": "\"(?=([^\"]|\\\"){40,}\")|'(?=([^']|\\'){40,}')"
}],
"quotes": ["error", "single", {"avoidEscape": true}],
// Angular
"angular/directive-name": ["error", "rg"]
},
"settings": {
"import/resolver": "webpack"
}
},
{
"files": [
"**/*.test.js"
],
"env": {
"mocha": true
},
"globals": {
"sandbox": false
}
}
]
};