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

Commit 15984af

Browse files
Upgrade config for ESLint 3.3
1 parent 00a75b2 commit 15984af

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

coding-styles/base.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ module.exports = {
232232
// disallowing the use of nested ternary expressions.
233233
'no-nested-ternary': 2,
234234

235-
// Disallow Spaces in Function Calls
236-
// While it's possible to have whitespace between the name of a function and the parentheses
237-
// that execute it, such patterns tend to look more like errors.
238-
'no-spaced-func': 1,
235+
// Require or disallow spacing between function identifiers and their invocations
236+
// This rule disallows spaces between the function name and the opening parenthesis that calls
237+
// it.
238+
'func-call-spacing': 1,
239239

240240
// Disallow trailing spaces at the end of lines
241241
// Sometimes in the course of editing files, you can end up with extra whitespace at the end of

coding-styles/torment.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ module.exports = {
4040
// Of course you should sort your imports! It makes your code look more like poetry!
4141
'sort-imports': 1,
4242

43+
// Object key sorting
44+
// And of course you should sort your keys, who wants to look at such ugly, unsorted objects?
45+
'sort-keys': 1,
46+
4347
// Variable Sorting
4448
// Sort all the things!
4549
'sort-vars': 1,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"license": "BSD-3-Clause",
1818
"main": "default",
1919
"peerDependencies": {
20-
"eslint": "^3.2.0"
20+
"eslint": "^3.3.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": "^3.2.0"
30+
"eslint": "^3.3.0"
3131
}
3232
}

standard/known-errors.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ module.exports = {
102102
// which is not implemented in several browsers.
103103
'no-iterator': 2,
104104

105-
// Disallow negated left operand of `in` operator
106-
'no-negated-in-lhs': 2,
105+
// Disallow negating the left operand of relational operators
106+
// This rule disallows negating the left operand of Relational Operators
107+
// See MDN: https://goo.gl/nFA3Mk
108+
'no-unsafe-negation': 2,
107109

108110
// Disallow Symbol Constructor
109111
// This rule is aimed at preventing the accidental calling of Symbol with the `new` operator.
@@ -133,6 +135,11 @@ module.exports = {
133135
// recommended to avoid using them.
134136
'no-sparse-arrays': 2,
135137

138+
// Disallow template literal placeholder syntax in regular strings
139+
// This rule aims to warn when a regular string contains what looks like a template literal
140+
// placeholder.
141+
'no-template-curly-in-string': 1,
142+
136143
// Avoid unexpected multiline expressions
137144
// This particular rule aims to spot scenarios where a newline looks like it is ending a
138145
// statement, but is not.
@@ -272,9 +279,11 @@ module.exports = {
272279
// This rule is aimed at eliminating unintentional fallthrough of one case to the other.
273280
'no-fallthrough': 2,
274281

275-
// Disallow Reassignment of Native Objects
276-
// Reports an error when they encounter an attempt to assign a value to built-in native object.
277-
'no-native-reassign': 2,
282+
// Disallow assignment to native objects or read-only global variables
283+
// This rule disallows modifications to read-only global variables.
284+
'no-global-assign': [2, {
285+
exceptions: ['Promise']
286+
}],
278287

279288
// Disallow Octal Escapes
280289
// As of version 5 of the ECMAScript specification, octal escape sequences are a deprecated

0 commit comments

Comments
 (0)