-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
123 lines (118 loc) · 3.71 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
"extends": "eslint:recommended",
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
},
"parserOptions": {
"sourceType": "module"
},
"rules":{
"no-debugger": "warn",
"no-console": ["warn", { allow: ["warn", "error", "info"] }],
"comma-dangle": "error",
"no-negated-in-lhs": "error",
"block-scoped-var": "error",
"complexity": ["error", 40],
"default-case": "error",
"dot-notation": "error",
"eqeqeq": "error",
"no-alert": "error",
"no-caller": "error",
"no-else-return": 1,
"no-labels": "off",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-lone-blocks": "error",
"no-multi-str": "error",
"no-native-reassign": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal-escape": "error",
"no-proto": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-useless-call": "error",
"no-with": "error",
"radix": "error",
"wrap-iife": "error",
"yoda": "error",
"no-catch-shadow": "error",
"no-label-var": "error",
"no-shadow-restricted-names": "error",
"no-shadow": "error",
"no-undef-init": "error",
"no-unused-vars": ["error", { "args": "none", "ignoreRestSiblings": true }],
"callback-return": "error",
"no-mixed-requires": "error",
"no-path-concat": "error",
"no-sync": "error",
"brace-style": "error",
"camelcase": ["error", {"properties": "always"}],
"comma-spacing": ["error", {"before": false, "after": true}],
"consistent-this": ["error", "self"],
"eol-last": "error",
"func-style": ["off", "declaration"],
"indent": ["error", 2],
"max-nested-callbacks": ["error", 6],
"new-cap": "off",
"new-parens": "error",
"no-array-constructor": "error",
"no-lonely-if": "error",
"no-nested-ternary": "error",
"no-new-object": "error",
"object-shorthand": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"quotes": ["error", "single", "avoid-escape"],
"semi-spacing": ["error", {"before": false, "after": true}],
"semi": ["error", "always"],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
"arrow-spacing": "error",
"constructor-super": "error",
"no-var": "error",
"prefer-const": ["error", {"destructuring": "all"}],
"prefer-spread": "error",
"require-yield": "error",
"max-params": ["error", 6],
"no-bitwise": "error",
"id-match": ["error", "^[a-zA-Z_$]+[a-zA-Z0-9_]*$", {"properties": false}],
"linebreak-style": ["error", "unix"],
"curly": ["error", "multi-line", "consistent"],
"no-restricted-properties": ["error", {
"object": "Object",
"property": "assign",
"message": "Please use object spread {...} instead."
}],
"no-restricted-globals": ["error", "encodeURI"], // if you think you want this, you probably want encodeURIComponent instead
"keyword-spacing": ["error", { "before": true, "after": true }],
"no-underscore-dangle": ["error", { "allowAfterThis": true }]
},
"overrides": [
{
"files": [ "**/*.test.js" ],
"env": { "mocha": true },
"globals": {"sinon": true, "expect": true},
"rules": {
"no-underscore-dangle": "off"
}
},
{
"files": [ "*.js" ],
"env": { "node": true }
}
]
}