Skip to content

Commit

Permalink
docs(eslint-plugin): fix typo in prefer-ts-expect-error (#8504)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexttyip authored Feb 19, 2024
1 parent 98aa4f3 commit 300d7d2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: 'Enforce using `@ts-expect-error` over `@ts-ignore`.'
TypeScript allows you to suppress all errors on a line by placing a comment starting with `@ts-ignore` or `@ts-expect-error` immediately before the erroring line.
The two directives work the same, except `@ts-expect-error` causes a type error if placed before a line that's not erroring in the first place.

This means its easy for `@ts-ignore`s to be forgotten about, and remain in code even after the error they were suppressing is fixed.
This means it's easy for `@ts-ignore`s to be forgotten about, and remain in code even after the error they were suppressing is fixed.
This is dangerous, as if a new error arises on that line it'll be suppressed by the forgotten about `@ts-ignore`, and so be missed.

## Examples
Expand Down

0 comments on commit 300d7d2

Please sign in to comment.