Skip to content

Commit

Permalink
[eslint config] [base] [breaking] Update object-curly-newline to ma…
Browse files Browse the repository at this point in the history
…tch eslint 4.18.0

In eslint v4.18.0 separate settings are introduced for imports and exports for the `object-curly-newline` rule.

Without this change, there is different behavior when updating eslint to this version.
  • Loading branch information
remcohaszing authored and ljharb committed Mar 1, 2018
1 parent 55adae9 commit a100a39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/eslint-config-airbnb-base/rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ module.exports = {
// https://eslint.org/docs/rules/object-curly-newline
'object-curly-newline': ['error', {
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
ObjectPattern: { minProperties: 4, multiline: true, consistent: true }
ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },
ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },
}],

// enforce "same line" or "multiple line" on object properties.
Expand Down

0 comments on commit a100a39

Please sign in to comment.