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

Commit 25cb26c

Browse files
Upgrade to ESLint 3.17
1 parent d8b9bd4 commit 25cb26c

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ This software is licensed under the **BSD-3-Clause License**. See the [LICENSE](
5959
[eslint-url]: http://eslint.org
6060
[travis-badge]: https://travis-ci.org/strvcom/eslint-config-javascript.svg
6161
[travis-url]: https://travis-ci.org/strvcom/eslint-config-javascript
62-
[eslint-version]: https://img.shields.io/badge/ESLint->=3.16.0-brightgreen.svg
62+
[eslint-version]: https://img.shields.io/badge/ESLint->=3.17.0-brightgreen.svg
6363
[eslint-fixing]: http://eslint.org/docs/user-guide/command-line-interface#fix

coding-styles/fixable.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,17 @@ module.exports = {
186186
maxEOF: 1,
187187
}],
188188

189+
// Enforce the location of single-line statements
190+
// When writing if, else, while, do-while, and for statements, the body can be a single
191+
// statement instead of a block. It can be useful to enforce a consistent location for these
192+
// single statements.
193+
'nonblock-statement-body-position': [1, 'below', {
194+
overrides: {
195+
if: 'beside',
196+
else: 'beside',
197+
},
198+
}],
199+
189200
// Disallow conditional expressions that can be expressed with simpler constructs
190201
// Use || instead of ternary in default assignments
191202
'no-unneeded-ternary': [1, {

environments/shared/recommended.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ module.exports = {
7474
// defined is reached.
7575
'no-case-declarations': 2,
7676

77+
// Disallow comparing against -0
78+
// The rule should warn against code that tries to compare against -0, since that will not work
79+
// as intended. That is, code like x === -0 will pass for both +0 and -0.
80+
'no-compare-neg-zero': 2,
81+
7782
// Disallow Assignment in Conditional Statements
7883
// This rule is aimed at eliminating ambiguous assignments in for, if, while, and do...while
7984
// conditional statements.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"eslint-plugin-react": "^6.10.0"
1313
},
1414
"devDependencies": {
15-
"eslint": "^3.16.0"
15+
"eslint": "^3.17.0"
1616
},
1717
"engines": {},
1818
"homepage": "https://github.com/strvcom/eslint-config-javascript",
@@ -23,7 +23,7 @@
2323
"license": "BSD-3-Clause",
2424
"main": "default",
2525
"peerDependencies": {
26-
"eslint": "^3.16.0"
26+
"eslint": "^3.17.0"
2727
},
2828
"repository": {
2929
"type": "git",

0 commit comments

Comments
 (0)