9
9
'use strict'
10
10
11
11
module . exports = {
12
- 'rules' : {
13
- // Enforce/Disallow Variable Initializations
14
- // Unused, too restrictive. On frequent occasions, you need to declare a property uninitialised and
15
- // give it value later.
16
- 'init-declarations' : 0 ,
17
-
18
- // Disallow Shadowing of Variables Inside of catch
19
- // In IE 8 and earlier, the catch clause parameter can overwrite the value of a variable in the
20
- // outer scope, if that variable has the same name as the catch clause parameter.
21
- // Unused, front-end specific. Should be moved to appropriate front-end config as soon as it
22
- // exists.
23
- 'no-catch-shadow' : 0 ,
24
-
12
+ rules : {
25
13
// Treat var as Block Scoped
26
14
// Unused in favour of `no-var` rule. Front-end could have some interest in this rule.
27
15
'block-scoped-var' : 0 ,
@@ -63,10 +51,6 @@ module.exports = {
63
51
// exists.
64
52
'no-script-url' : 0 ,
65
53
66
- // Limit Maximum Number of Statements
67
- // Unused, too restrictive.
68
- 'max-statements' : 0 ,
69
-
70
54
// Disallow ++ and --
71
55
// Unused, these operators are quite useful as long as whitespace is used responsibly around them.
72
56
'no-plusplus' : 0 ,
@@ -93,33 +77,8 @@ module.exports = {
93
77
// Unused, continue seems to be quite useful.
94
78
'no-continue' : 0 ,
95
79
96
- // Disallow use of negated expressions in conditions
97
- // Unused, too restrictive.
98
- 'no-negated-condition' : 0 ,
99
-
100
80
// Disallow Ternary Operators
101
81
// You kidding me? Ternaries are great!
102
- 'no-ternary' : 0 ,
103
-
104
- // Variable Sorting
105
- // Unused, too restrictive.
106
- 'sort-vars' : 0 ,
107
-
108
- // Disallow Magic Numbers
109
- // Unused, too restrictive. It was flagging i.e. `array.indexOf('a') !== -1` (is 'a' in this array?)
110
- // as errors. Also, status code checks in HTTP responses were being reported as issues.
111
- // While I generally like the idea, current implementation simply won't fly well.
112
- 'no-magic-numbers' : 0 ,
113
-
114
- // Require Radix Parameter
115
- // This rule is aimed at preventing the unintended conversion of a string to a number of a
116
- // different base than intended.
117
- // Unused, too restrictive. Front-end team might have some interest in this as the whole radix
118
- // issue started with different browsers using different radix for different numbers.
119
- 'radix' : 0 ,
120
-
121
- // Require Regex Literals to be Wrapped
122
- // Unused, too restrictive.
123
- 'wrap-regex' : 0
82
+ 'no-ternary' : 0
124
83
}
125
84
}
0 commit comments