Skip to content

Commit 7a21e8d

Browse files
committed
removes minProperties from object-curly-newline rule
1 parent 7bf85ad commit 7a21e8d

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

configs/base/rules/style.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,10 @@ module.exports = {
388388
// enforce line breaks between braces
389389
// https://eslint.org/docs/rules/object-curly-newline
390390
'object-curly-newline': ['error', {
391-
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
392-
ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
393-
ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },
394-
ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },
391+
ObjectExpression: { multiline: true, consistent: true },
392+
ObjectPattern: { multiline: true, consistent: true },
393+
ImportDeclaration: { multiline: true, consistent: true },
394+
ExportDeclaration: { multiline: true, consistent: true },
395395
}],
396396

397397
// enforce "same line" or "multiple line" on object properties.

demo/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,12 @@ const {
2727
// Missing trailing comma
2828
prop_3: prop3
2929
} = someProps;
30+
31+
const inlineObject = { inlineProp1: '', inlineProp2: '', inlineProp3: '' };
32+
33+
const {
34+
inlineProp1, inlineProp2, inlineProp3,
35+
} = inlineObject;
36+
37+
const { inlineProp1: inlineProp1b, // Expected a line break after this opening brace
38+
inlineProp2: inlineProp2b, inlineProp3: inlineProp3b } = inlineObject; // Expected a line break before this closing brace

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@trbl/eslint-config",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"main": "index.js",
55
"repository": "git@github.com:trouble/eslint-config.git",
66
"description": "Please do not feed the dust bunnies.",

0 commit comments

Comments
 (0)