-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.eslintrc
64 lines (64 loc) · 1.8 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
{
"extends": "eslint:recommended",
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"modules": true
}
},
"env": {
"browser": true,
"es6": true,
"jasmine": true,
"node": true
},
"plugins": ["angular", "lodash"],
"globals": {
"_": true,
"inject": true,
"module": true
},
"rules": {
// Possible errors
"no-console": "off", // Comment for production
// Best practices
"dot-notation": "warn",
"no-multi-spaces": "warn",
// Variables
"no-unused-vars": "warn",
// Stylistic Issues
"array-bracket-spacing": "warn",
// "camelcase": ["warn", {"properties": "always"}],
"comma-spacing": "warn",
"consistent-this": ["error", "vm"],
"no-mixed-spaces-and-tabs": "warn",
"no-trailing-spaces": "warn",
"quote-props": ["error", "as-needed", {"keywords": true}],
"quotes": ["warn", "single"],
"semi": ["error", "always"],
// ES6
"no-confusing-arrow": "error",
"no-const-assign": "error",
"no-var": "warn",
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
// Lodash
"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"
}
}