From 303c420e35dd0ad4e7e299fc8be992b4086bda70 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 18 Dec 2024 12:30:21 +0200 Subject: [PATCH] feature: @putout/eslint-config: operator-linebreak: || --- packages/eslint-config/eslintrc.js | 1 + .../eslint-config/test/fixture/operator-linebreak-fix.js | 6 ++++++ packages/eslint-config/test/fixture/operator-linebreak.js | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/packages/eslint-config/eslintrc.js b/packages/eslint-config/eslintrc.js index 68060a76d8..c9603df94d 100644 --- a/packages/eslint-config/eslintrc.js +++ b/packages/eslint-config/eslintrc.js @@ -79,6 +79,7 @@ module.exports = { '=': 'none', '|': 'before', '||': 'before', + '&&': 'before', ':': 'before', '?': 'before', }, diff --git a/packages/eslint-config/test/fixture/operator-linebreak-fix.js b/packages/eslint-config/test/fixture/operator-linebreak-fix.js index ffcf79b17d..a7a8ba653c 100644 --- a/packages/eslint-config/test/fixture/operator-linebreak-fix.js +++ b/packages/eslint-config/test/fixture/operator-linebreak-fix.js @@ -7,3 +7,9 @@ x = z : s; x = x ? y : s; + +const isIndent = 0 + || 1 + && 2 + && 3 + && 4; diff --git a/packages/eslint-config/test/fixture/operator-linebreak.js b/packages/eslint-config/test/fixture/operator-linebreak.js index 599d8ebbcf..ff39dfdb1f 100644 --- a/packages/eslint-config/test/fixture/operator-linebreak.js +++ b/packages/eslint-config/test/fixture/operator-linebreak.js @@ -11,3 +11,9 @@ x = z : s; x = x ? y : s; + +const isIndent = 0 + || 1 + && 2 + && 3 + && 4;