[eslint config] [base] [deps] update eslint to v4.9

This commit is contained in:
Jordan Harband
2017-10-16 11:42:13 -07:00
parent f8f13d9bf1
commit 3581bac32f
3 changed files with 16 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"prelint": "editorconfig-tools check * rules/* test/*",
"lint": "eslint .",
"lint": "eslint --report-unused-disable-directives .",
"tests-only": "babel-tape-runner ./test/test-*.js",
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
"pretest": "npm run --silent lint",
@@ -51,7 +51,7 @@
"babel-preset-airbnb": "^2.4.0",
"babel-tape-runner": "^2.0.1",
"editorconfig-tools": "^0.1.1",
"eslint": "^4.8.0",
"eslint": "^4.9.0",
"eslint-find-rules": "^3.1.1",
"eslint-plugin-import": "^2.7.0",
"in-publish": "^2.0.0",
@@ -59,7 +59,7 @@
"tape": "^4.8.0"
},
"peerDependencies": {
"eslint": "^4.8.0",
"eslint": "^4.9.0",
"eslint-plugin-import": "^2.7.0"
},
"engines": {

View File

@@ -57,7 +57,9 @@ module.exports = {
'no-div-regex': 'off',
// disallow else after a return in an if
'no-else-return': 'error',
// https://eslint.org/docs/rules/no-else-return
// TODO: semver-major, set allowElseIf to false
'no-else-return': ['error', { allowElseIf: true }],
// disallow empty functions, except for standalone funcs/arrows
// http://eslint.org/docs/rules/no-empty-function

View File

@@ -3,7 +3,7 @@ module.exports = {
// enforce line breaks after opening and before closing array brackets
// http://eslint.org/docs/rules/array-bracket-newline
// TODO: enable? semver-major
'array-bracket-newline': ['off', { multiline: true, minItems: 3 }],
'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 }
// enforce line breaks between array elements
// http://eslint.org/docs/rules/array-element-newline
@@ -153,6 +153,11 @@ module.exports = {
// http://eslint.org/docs/rules/linebreak-style
'linebreak-style': ['error', 'unix'],
// require or disallow an empty line between class members
// https://eslint.org/docs/rules/lines-between-class-members
// TODO: semver-major: enable
'lines-between-class-members': ['off', 'always', { exceptAfterSingleLine: false }],
// enforces empty lines around comments
'lines-around-comment': 'off',
@@ -197,6 +202,10 @@ module.exports = {
// http://eslint.org/docs/rules/max-statements-per-line
'max-statements-per-line': ['off', { max: 1 }],
// enforce a particular style for multiline comments
// https://eslint.org/docs/rules/multiline-comment-style
'multiline-comment-style': ['off', 'starred-block'],
// require multiline ternary
// http://eslint.org/docs/rules/multiline-ternary
// TODO: enable?