You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ESLint plugin includes several opinionated rules aimed at enhancing the readability, performance, and maintainability of conditionals in JavaScript.
3
4
4
5
These rules focus on writing clear and efficient conditional statements, so while they encourage consistency and simplicity, they may not suit every coding style. Feel free to adjust the rules based on your team's preferences.
|[no-constant-conditionals](docs/no-constant-conditionals.md)| This rule disallows conditionals that always evaluate to true or false. |
36
-
|[no-duplicated-conditions](docs/no-duplicated-conditions.md)| This rule disallows duplicate conditions in if-else chains. |
37
-
|[no-excessive-nested-conditionals](docs/no-excessive-nested-conditionals.md)| This rule disallows excessive nesting of conditionals in order to improve code readability. |
38
-
|[no-long-else-if-chains](docs/no-long-else-if-chains.md)| This rule limits the number of consecutive else-if statements. |
39
-
|[no-nested-ternary-operators](docs/no-nested-ternary-operators.md)| This rule disallows nested ternary operators. |
40
-
|[no-useless-ternary](docs/no-useless-ternary.md)| This rule disallows unnecessary ternary expressions. |
41
-
|[prefer-early-return](docs/prefer-early-return.md)| This rule encourages the use of early returns instead of deeply nested if-else blocks. |
42
-
|[require-default-in-switch](docs/require-default-in-switch.md)| This rule ensures that switch statements include a default case and/or its not empty. |
43
34
35
+
This plugin enforces the following opinionated best practices:
|[no-constant-conditionals](docs/no-constant-conditionals.md)| This rule disallows conditionals that always evaluate to true or false. |
40
+
|[no-duplicated-conditions](docs/no-duplicated-conditions.md)| This rule disallows duplicate conditions in if-else chains. |
41
+
|[no-excessive-nested-conditionals](docs/no-excessive-nested-conditionals.md)| This rule disallows excessive nesting of conditionals in order to improve code readability. |
42
+
|[no-long-else-if-chains](docs/no-long-else-if-chains.md)| This rule limits the number of consecutive else-if statements. |
43
+
|[no-nested-ternary-operators](docs/no-nested-ternary-operators.md)| This rule disallows nested ternary operators. |
44
+
|[no-useless-ternary](docs/no-useless-ternary.md)| This rule disallows unnecessary ternary expressions. |
45
+
|[prefer-early-return](docs/prefer-early-return.md)| This rule encourages the use of early returns instead of deeply nested if-else blocks. |
46
+
|[require-default-in-switch](docs/require-default-in-switch.md)| This rule ensures that switch statements include a default case and/or its not empty. |
47
+
|[no-eval](docs/no-eval.md)| This rule disallows the use of eval() due to security risks. |
0 commit comments