Skip to content

Commit 52aa54b

Browse files
JoshuaKGoldbergauvred
authored andcommitted
chore(website): auto-generate type checked rule notice in rule docs (typescript-eslint#7951)
* chore(website): auto-generate type checked rule notice in rule docs * Remove called-out now-unnecessary blips * fix /troubleshooting/performance-troubleshooting link * Standardized insertion helper naming, and added to a folder * Consolidated into a utils.ts file * Add a thematic line break after existing content * Refactored into a class * Update packages/website/plugins/generated-rule-docs/index.ts
1 parent 066b1c1 commit 52aa54b

16 files changed

+793
-508
lines changed

.cspell.json

-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@
137137
"unfixable",
138138
"unoptimized",
139139
"unprefixed",
140-
"upcasting",
141140
"upsert",
142141
"warnonunsupportedtypescriptversion",
143142
"Zacher"

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ You might consider using [ESLint disable comments](https://eslint.org/docs/lates
101101
This rule has a known edge case of triggering on conditions that were modified within function calls (as side effects).
102102
It is due to limitations of TypeScript's type narrowing.
103103
See [#9998](https://github.com/microsoft/TypeScript/issues/9998) for details.
104-
105-
We recommend upcasting the variable with a [type assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions).
104+
We recommend using a [type assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions) in those cases.
106105

107106
```ts
108107
let condition = false as boolean;

0 commit comments

Comments
 (0)