Skip to content

Commit ab102c0

Browse files
Retsambradzacher
authored andcommitted
docs(eslint-plugin): [no-unnecessary-condition] tweak wording (typescript-eslint#1147)
Removes "looser/stricter" wording in favor of "more opinionated, less opinionated" and clarifies in what way `no-unnecessary-condition` is less opinionated.
1 parent d4703e1 commit ab102c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/eslint-plugin/docs/rules/no-unnecessary-condition.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ The main downside to using this rule is the need for type information.
5959

6060
## Related To
6161

62-
- ESLint: [no-constant-condition](https://eslint.org/docs/rules/no-constant-condition) - this rule is essentially a stronger version.
62+
- ESLint: [no-constant-condition](https://eslint.org/docs/rules/no-constant-condition) - `no-unnecessary-condition` is essentially a stronger version of `no-constant-condition`, but requires type information.
6363

64-
- [strict-boolean-expression](./strict-boolean-expressions.md) - a stricter alternative to this rule.
64+
- [strict-boolean-expressions](./strict-boolean-expressions.md) - a more opinionated version of `no-unnecessary-condition`. `strict-boolean-expressions` enforces a specific code style, while `no-unnecessary-condition` is about correctness.

packages/eslint-plugin/docs/rules/strict-boolean-expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ Options may be provided as an object with:
6363

6464
- TSLint: [strict-boolean-expressions](https://palantir.github.io/tslint/rules/strict-boolean-expressions)
6565

66-
- [no-unnecessary-condition](./no-unnecessary-condition.md) - a looser alternative to this rule.
66+
- [no-unnecessary-condition](./no-unnecessary-condition.md) - essentially a less opinionated alternative to this rule. `strict-boolean-expressions` enforces a specific code style, while `no-unnecessary-condition` is about correctness.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy