Skip to content

Commit 3a5448b

Browse files
Add object-curly-newline rule (#83)
Co-authored-by: Sindre Sorhus <[email protected]>
1 parent 7d89a3d commit 3a5448b

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

index.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,30 @@ module.exports = {
420420
'error',
421421
'never',
422422
],
423-
// Disabled because of https://github.com/xojs/eslint-config-xo/issues/27
424-
// 'object-property-newline': 'error',
423+
'object-curly-newline': [
424+
'error',
425+
{
426+
ObjectExpression: {
427+
multiline: true,
428+
minProperties: 4,
429+
consistent: true,
430+
},
431+
ObjectPattern: {
432+
multiline: true,
433+
consistent: true,
434+
},
435+
ImportDeclaration: {
436+
multiline: true,
437+
minProperties: 4,
438+
consistent: true,
439+
},
440+
ExportDeclaration: {
441+
multiline: true,
442+
minProperties: 4,
443+
consistent: true,
444+
},
445+
},
446+
],
425447
'one-var': [
426448
'error',
427449
'never',

0 commit comments

Comments
 (0)