Skip to content

Commit 0814be6

Browse files
committed
[eslint config] [base] [deps] update eslint, eslint-find-rules
Adds disabled rules: `max-lines`, `no-mixed-operators`, `rest-spread-spacing`, `object-curly-newline`
1 parent 22f59b6 commit 0814be6

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
"homepage": "https://github.com/airbnb/javascript",
4747
"devDependencies": {
4848
"babel-tape-runner": "^1.3.1",
49-
"eslint": "^2.11.1",
50-
"eslint-find-rules": "^1.9.2",
49+
"eslint": "^2.12.0",
50+
"eslint-find-rules": "^1.10.0",
5151
"eslint-plugin-import": "^1.8.1",
5252
"tape": "^4.5.1",
5353
"in-publish": "^2.0.0"
5454
},
5555
"peerDependencies": {
56-
"eslint": "^2.11.1",
56+
"eslint": "^2.12.0",
5757
"eslint-plugin-import": "^1.8.1"
5858
}
5959
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ module.exports = {
117117
// disallow generator functions that do not have yield
118118
'require-yield': 0,
119119

120+
// enforce spacing between object rest-spread
121+
// http://eslint.org/docs/rules/rest-spread-spacing
122+
'rest-spread-spacing': [0, 'never'],
123+
120124
// import sorting
121125
// http://eslint.org/docs/rules/sort-imports
122126
'sort-imports': 0,

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ module.exports = {
8383
ignoreComments: false
8484
}],
8585

86+
// specify the max number of lines in a file
87+
// http://eslint.org/docs/rules/max-lines
88+
'max-lines': [0, {
89+
max: 300,
90+
skipBlankLines: true,
91+
skipComments: true
92+
}],
93+
8694
// specify the maximum depth callbacks can be nested
8795
'max-nested-callbacks': 0,
8896

@@ -128,6 +136,20 @@ module.exports = {
128136
// disallow if as the only statement in an else block
129137
'no-lonely-if': 0,
130138

139+
// disallow un-paren'd mixes of different operators
140+
// http://eslint.org/docs/rules/no-mixed-operators
141+
// TODO: enable
142+
'no-mixed-operators': [0, {
143+
groups: [
144+
['+', '-', '*', '/', '%', '**'],
145+
['&', '|', '^', '~', '<<', '>>', '>>>'],
146+
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
147+
['&&', '||'],
148+
['in', 'instanceof']
149+
],
150+
allowSamePrecedence: false
151+
}],
152+
131153
// disallow mixed spaces and tabs for indentation
132154
'no-mixed-spaces-and-tabs': 2,
133155

@@ -181,6 +203,13 @@ module.exports = {
181203
// require padding inside curly braces
182204
'object-curly-spacing': [2, 'always'],
183205

206+
// enforce line breaks between braces
207+
// http://eslint.org/docs/rules/object-curly-newline
208+
'object-curly-newline': [0, {
209+
ObjectExpression: { minProperties: 0, multiline: true },
210+
ObjectPattern: { minProperties: 0, multiline: true }
211+
}],
212+
184213
// enforce "same line" or "multiple line" on object properties.
185214
// http://eslint.org/docs/rules/object-property-newline
186215
// TODO: enable when https://github.com/eslint/eslint/issues/5667#issuecomment-219334864 is resolved

0 commit comments

Comments
 (0)