From 3a5448b349e9cfb6780b476a87bdb96439cea403 Mon Sep 17 00:00:00 2001 From: Jon Sun Date: Sun, 12 Nov 2023 01:57:12 +1300 Subject: [PATCH] Add `object-curly-newline` rule (#83) Co-authored-by: Sindre Sorhus --- index.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index fe79b0c..def0046 100644 --- a/index.js +++ b/index.js @@ -420,8 +420,30 @@ module.exports = { 'error', 'never', ], - // Disabled because of https://github.com/xojs/eslint-config-xo/issues/27 - // 'object-property-newline': 'error', + 'object-curly-newline': [ + 'error', + { + ObjectExpression: { + multiline: true, + minProperties: 4, + consistent: true, + }, + ObjectPattern: { + multiline: true, + consistent: true, + }, + ImportDeclaration: { + multiline: true, + minProperties: 4, + consistent: true, + }, + ExportDeclaration: { + multiline: true, + minProperties: 4, + consistent: true, + }, + }, + ], 'one-var': [ 'error', 'never',