From d2d6121f3ed25b460c3d2af65fcde50b455346f7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 23 Jan 2021 11:47:25 -0800 Subject: [PATCH] tools: enable object-curly-newline in ESLint rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: https://github.com/nodejs/node/pull/37028#pullrequestreview-574744497 PR-URL: https://github.com/nodejs/node/pull/37040 Reviewed-By: Michaƫl Zasso Reviewed-By: Antoine du Hamel --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 010c02be11bcf4..6d7afd31fae5ee 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -258,6 +258,7 @@ module.exports = { 'no-void': 'error', 'no-whitespace-before-property': 'error', 'no-with': 'error', + 'object-curly-newline': 'error', 'object-curly-spacing': ['error', 'always'], 'one-var': ['error', { initialized: 'never' }], 'one-var-declaration-per-line': 'error',