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

Commit 2ca114c

Browse files
Upgrade ESLint to 4.2.0
1 parent 5653499 commit 2ca114c

File tree

7 files changed

+592
-168
lines changed

7 files changed

+592
-168
lines changed

README.md

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

coding-styles/recommended.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ module.exports = {
7979
// allowed on a single line can be very beneficial for readability and maintainability.
8080
'max-statements-per-line': 'warn',
8181

82+
// Enforce newlines between operands of ternary expressions
83+
// Enforce either the whole ternary on a single line or each part of the ternary on its own line
84+
// if the expression contains a newline
85+
'multiline-ternary': ['warn', 'always-multiline'],
86+
8287
// Require Constructors to Use Initial Caps
8388
// This rule is aimed at helping to distinguish regular functions from constructor functions. As
8489
// such, it warns whenever it sees new followed by an identifier that isn't capitalized or

environments/nodejs/recommended.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ module.exports = {
5353
// Disallow Synchronous Methods
5454
// This rule is aimed at preventing synchronous methods from being called in Node.js. It looks
5555
// specifically for the method suffix "Sync" (as is the convention with Node.js operations).
56-
'no-sync': 'warn',
56+
'no-sync': ['warn', {
57+
allowAtRootLevel: true,
58+
}],
5759
},
5860
}

environments/shared/recommended.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ module.exports = {
5858
// an infinite for loop is a bug.
5959
'for-direction': 'error',
6060

61+
// Enforce that a return statement is present in property getters
62+
// Not returning a value from a property getter is most likely a programmer mistake.
63+
'getter-return': 'error',
64+
6165
// Require Guarding for-in
6266
// This rule is aimed at preventing unexpected behavior that could arise from using a for-in
6367
// loop without filtering the results in the loop.

0 commit comments

Comments
 (0)