Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Commit c292939

Browse files
Upgrade ESLint to 2.9, add new rule definitions
1 parent b8b0a18 commit c292939

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"license": "BSD-3-Clause",
1818
"main": "default",
1919
"peerDependencies": {
20-
"eslint": "^2.8.0"
20+
"eslint": "^2.9.0"
2121
},
2222
"repository": {
2323
"type": "git",
@@ -27,6 +27,6 @@
2727
"lint": "eslint standard environments coding-styles unused.js default.js"
2828
},
2929
"devDependencies": {
30-
"eslint": "^2.8.0"
30+
"eslint": "^2.9.0"
3131
}
3232
}

Diff for: standard/best-practices.js

+4
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ module.exports = {
191191
// that can be replaced with the normal function invocation.
192192
'no-useless-call': 2,
193193

194+
// Disallow unnecessary computed property keys on objects
195+
// It’s unnecessary to use computed properties when the property name is a literal.
196+
'no-useless-computed-key': 1,
197+
194198
// Disallow unncessary concatenation of strings
195199
// This rule aims to flag the concatenation of 2 literals when they could be combined into a
196200
// single literal.

Diff for: standard/known-errors.js

+7
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ module.exports = {
133133
// block exist after a `return`, `throw`, `break`, or `continue` statement.
134134
'no-unreachable': 2,
135135

136+
// Disallow control flow statements in finally blocks
137+
// JavaScript suspends the control flow statements of `try` and `catch` blocks until the
138+
// execution of `finally` block finishes. So, when `return`, `throw`, `break`, or `continue` is
139+
// used in `finally`, control flow statements inside `try` and `catch` are overwritten, which is
140+
// considered as unexpected behavior.
141+
'no-unsafe-finally': 2,
142+
136143
// Disallow Unused Labels
137144
// Labels that are declared and not used anywhere in the code are most likely an error due to
138145
// incomplete refactoring.

0 commit comments

Comments
 (0)