From 27a10089f1ba729ec2d9eba91e97b120d063f93b Mon Sep 17 00:00:00 2001 From: Jon Sun Date: Sat, 4 Nov 2023 23:02:45 +1300 Subject: [PATCH] feat: add object-curly-newline rule --- index.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index fe79b0c..350a695 100644 --- a/index.js +++ b/index.js @@ -420,8 +420,31 @@ 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: 2, + consistent: true, + }, + ObjectPattern: { + multiline: true, + minProperties: 4, + consistent: true, + }, + ImportDeclaration: { + multiline: true, + minProperties: 4, + consistent: true, + }, + ExportDeclaration: { + multiline: true, + minProperties: 2, + consistent: true, + }, + }, + ], 'one-var': [ 'error', 'never',