This repository was archived by the owner on Mar 7, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,11 @@ module.exports = {
144
144
// requiring the use of parentheses when invoking a constructor via the new keyword.
145
145
'new-parens' : 1 ,
146
146
147
+ // Disallow return in else
148
+ // If an if block contains a return statement, the else block becomes unnecessary. Its contents
149
+ // can be placed outside of the block.
150
+ 'no-else-return' : 1 ,
151
+
147
152
// Disallow Extra Boolean Casts
148
153
// In contexts such as an if statement's test where the result of the expression will already be
149
154
// coerced to a Boolean, casting to a Boolean via double negation (!!) is unnecessary.
Original file line number Diff line number Diff line change @@ -103,11 +103,6 @@ module.exports = {
103
103
includeExports : true ,
104
104
} ] ,
105
105
106
- // Disallow return in else
107
- // If an if block contains a return statement, the else block becomes unnecessary. Its contents
108
- // can be placed outside of the block.
109
- 'no-else-return' : 1 ,
110
-
111
106
// Disallows comments after code
112
107
// This rule will disallow comments on the same line as code.
113
108
'no-inline-comments' : 1 ,
Original file line number Diff line number Diff line change @@ -535,6 +535,13 @@ module.exports = {
535
535
// to. Additionally, the with statement cannot be used in strict mode.
536
536
'no-with' : 2 ,
537
537
538
+ // Require using Error objects as Promise rejection reasons
539
+ // It is considered good practice to only instances of the built-in Error object for
540
+ // user-defined errors in Promises. Error objects automatically store a stack trace, which can
541
+ // be used to debug an error by determining where it came from. If a Promise is rejected with a
542
+ // non-Error value, it can be difficult to determine where the rejection occurred.
543
+ 'prefer-promise-reject-errors' : 2 ,
544
+
538
545
// Suggest using the spread operator instead of .apply()
539
546
// This rule is aimed to flag usage of Function.prototype.apply() that can be replaced with the
540
547
// spread operator.
Original file line number Diff line number Diff line change @@ -60,6 +60,10 @@ module.exports = {
60
60
// Unused, too restrictive.
61
61
'no-invalid-this' : 0 ,
62
62
63
+ // Disallow Use of Chained Assignment Expressions
64
+ // Unused, seems handy.
65
+ 'no-multi-assign' : 0 ,
66
+
63
67
// Disallow Multiline Strings
64
68
// Unused, seems handy. This rule should be enabled when pre-ES5 compatibility is required.
65
69
'no-multi-str' : 0 ,
You can’t perform that action at this time.
0 commit comments