Skip to content

Commit 3b25e4a

Browse files
committed
fix(base): Prefer ternary operator only for single-line statements
1 parent 0fbaaea commit 3b25e4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configurations/base/plugins/unicorn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ module.exports = {
408408

409409
// Prefer ternary expressions over simple if-else statements (autofixable)
410410
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md
411-
'+unicorn/prefer-ternary': ['error', 'always'],
411+
'+unicorn/prefer-ternary': ['error', 'only-single-line'],
412412

413413
// Prefer top-level await over top-level promises and async function calls
414414
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md

0 commit comments

Comments
 (0)