-
Notifications
You must be signed in to change notification settings - Fork 54
/
.eslintrc
executable file
·76 lines (76 loc) · 2.16 KB
/
.eslintrc
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
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"jasmine": true,
"jquery": true
},
"globals": {
"_": true,
"$filter": true,
"$route": true,
"angular": true,
"angularDragula": true,
"BE": true,
"dimple": true,
"inject": true,
"module": true,
"moment": true,
"ol": true,
"protractor": true,
"qq": true,
"saveAs": true,
"Spinner": true,
"Terraformer": true
},
"plugins": ["angular", "lodash", "protractor"],
"rules": {
// Possible errors
"no-console": "warn",
// Best practices
"block-scoped-var": "warn",
"dot-notation": "warn",
"no-multi-spaces": "warn",
// Variables
"no-unused-vars": "warn",
// Stylistic Issues
"array-bracket-spacing": "warn",
"brace-style": "warn",
// "camelcase": "warn",
"comma-dangle": ["error", "never"],
"comma-spacing": "warn",
// "consistent-this": ["error", "that"],
"eol-last": "error",
"indent": ["error", 2, {"SwitchCase": 1}],
"key-spacing": "warn",
"no-mixed-spaces-and-tabs": "warn",
"no-trailing-spaces": "warn",
"quote-props": ["error", "as-needed", {"keywords": true}],
"quotes": ["warn", "single"],
"semi": ["error", "always"],
"space-before-blocks": "warn",
"space-before-function-paren": "warn",
"space-infix-ops": "warn",
// Angular plugin
"angular/log": "off", // Comment for production
"angular/no-service-method": "off",
// Lodash plugin
"lodash/callback-binding": "error",
"lodash/collection-return": "error",
"lodash/matches-prop-shorthand": ["warn", "always"],
"lodash/matches-shorthand": ["warn", "always"],
"lodash/no-double-unwrap": "error",
"lodash/no-extra-args": "error",
"lodash/prefer-constant": "warn",
"lodash/prefer-filter": ["warn", 3],
"lodash/prefer-get": ["warn", 2],
"lodash/prefer-is-nil": "warn",
"lodash/prefer-lodash-typecheck": "warn",
"lodash/prefer-matches": ["warn", 2],
"lodash/prefer-startswith": "warn",
"lodash/prefer-times": "warn",
"lodash/preferred-alias": "warn",
"lodash/prop-shorthand": ["warn", "always"],
"lodash/unwrap": "error"
}
}