Skip to content

Commit 3581bac

Browse files
committed
[eslint config] [base] [deps] update eslint to v4.9
1 parent f8f13d9 commit 3581bac

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

packages/eslint-config-airbnb-base/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"prelint": "editorconfig-tools check * rules/* test/*",
8-
"lint": "eslint .",
8+
"lint": "eslint --report-unused-disable-directives .",
99
"tests-only": "babel-tape-runner ./test/test-*.js",
1010
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
1111
"pretest": "npm run --silent lint",
@@ -51,15 +51,15 @@
5151
"babel-preset-airbnb": "^2.4.0",
5252
"babel-tape-runner": "^2.0.1",
5353
"editorconfig-tools": "^0.1.1",
54-
"eslint": "^4.8.0",
54+
"eslint": "^4.9.0",
5555
"eslint-find-rules": "^3.1.1",
5656
"eslint-plugin-import": "^2.7.0",
5757
"in-publish": "^2.0.0",
5858
"safe-publish-latest": "^1.1.1",
5959
"tape": "^4.8.0"
6060
},
6161
"peerDependencies": {
62-
"eslint": "^4.8.0",
62+
"eslint": "^4.9.0",
6363
"eslint-plugin-import": "^2.7.0"
6464
},
6565
"engines": {

packages/eslint-config-airbnb-base/rules/best-practices.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ module.exports = {
5757
'no-div-regex': 'off',
5858

5959
// disallow else after a return in an if
60-
'no-else-return': 'error',
60+
// https://eslint.org/docs/rules/no-else-return
61+
// TODO: semver-major, set allowElseIf to false
62+
'no-else-return': ['error', { allowElseIf: true }],
6163

6264
// disallow empty functions, except for standalone funcs/arrows
6365
// http://eslint.org/docs/rules/no-empty-function

packages/eslint-config-airbnb-base/rules/style.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
// enforce line breaks after opening and before closing array brackets
44
// http://eslint.org/docs/rules/array-bracket-newline
55
// TODO: enable? semver-major
6-
'array-bracket-newline': ['off', { multiline: true, minItems: 3 }],
6+
'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 }
77

88
// enforce line breaks between array elements
99
// http://eslint.org/docs/rules/array-element-newline
@@ -153,6 +153,11 @@ module.exports = {
153153
// http://eslint.org/docs/rules/linebreak-style
154154
'linebreak-style': ['error', 'unix'],
155155

156+
// require or disallow an empty line between class members
157+
// https://eslint.org/docs/rules/lines-between-class-members
158+
// TODO: semver-major: enable
159+
'lines-between-class-members': ['off', 'always', { exceptAfterSingleLine: false }],
160+
156161
// enforces empty lines around comments
157162
'lines-around-comment': 'off',
158163

@@ -197,6 +202,10 @@ module.exports = {
197202
// http://eslint.org/docs/rules/max-statements-per-line
198203
'max-statements-per-line': ['off', { max: 1 }],
199204

205+
// enforce a particular style for multiline comments
206+
// https://eslint.org/docs/rules/multiline-comment-style
207+
'multiline-comment-style': ['off', 'starred-block'],
208+
200209
// require multiline ternary
201210
// http://eslint.org/docs/rules/multiline-ternary
202211
// TODO: enable?

0 commit comments

Comments
 (0)