-
-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
244 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
crates/oxc_linter/src/snapshots/prefer_ts_expect_error.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
source: crates/oxc_linter/src/tester.rs | ||
expression: prefer_ts_expect_error | ||
--- | ||
|
||
⚠ typescript-eslint(prefer-ts-expect-error): Enforce using `@ts-expect-error` over `@ts-ignore` | ||
╭─[prefer_ts_expect_error.tsx:1:1] | ||
1 │ // @ts-ignore | ||
· ───────────── | ||
╰──── | ||
help: Use "@ts-expect-error" to ensure an error is actually being suppressed. | ||
|
||
⚠ typescript-eslint(prefer-ts-expect-error): Enforce using `@ts-expect-error` over `@ts-ignore` | ||
╭─[prefer_ts_expect_error.tsx:1:1] | ||
1 │ // @ts-ignore: Suppress next line | ||
· ───────────────────────────────── | ||
╰──── | ||
help: Use "@ts-expect-error" to ensure an error is actually being suppressed. | ||
|
||
⚠ typescript-eslint(prefer-ts-expect-error): Enforce using `@ts-expect-error` over `@ts-ignore` | ||
╭─[prefer_ts_expect_error.tsx:1:1] | ||
1 │ ///@ts-ignore: Suppress next line | ||
· ───────────────────────────────── | ||
╰──── | ||
help: Use "@ts-expect-error" to ensure an error is actually being suppressed. | ||
|
||
⚠ typescript-eslint(prefer-ts-expect-error): Enforce using `@ts-expect-error` over `@ts-ignore` | ||
╭─[prefer_ts_expect_error.tsx:3:1] | ||
2 │ if (false) { | ||
3 │ // @ts-ignore: Unreachable code error | ||
· ───────────────────────────────────── | ||
4 │ console.log('hello'); | ||
╰──── | ||
help: Use "@ts-expect-error" to ensure an error is actually being suppressed. | ||
|
||
⚠ typescript-eslint(prefer-ts-expect-error): Enforce using `@ts-expect-error` over `@ts-ignore` | ||
╭─[prefer_ts_expect_error.tsx:1:1] | ||
1 │ /* @ts-ignore */ | ||
· ──────────────── | ||
╰──── | ||
help: Use "@ts-expect-error" to ensure an error is actually being suppressed. | ||
|
||
⚠ typescript-eslint(prefer-ts-expect-error): Enforce using `@ts-expect-error` over `@ts-ignore` | ||
╭─[prefer_ts_expect_error.tsx:2:1] | ||
1 │ | ||
2 │ ╭─▶ /** | ||
3 │ │ * Explaining comment | ||
4 │ │ * | ||
5 │ ╰─▶ * @ts-ignore */ | ||
6 │ | ||
╰──── | ||
help: Use "@ts-expect-error" to ensure an error is actually being suppressed. | ||
|
||
⚠ typescript-eslint(prefer-ts-expect-error): Enforce using `@ts-expect-error` over `@ts-ignore` | ||
╭─[prefer_ts_expect_error.tsx:1:1] | ||
1 │ /* @ts-ignore in a single block */ | ||
· ────────────────────────────────── | ||
╰──── | ||
help: Use "@ts-expect-error" to ensure an error is actually being suppressed. | ||
|
||
⚠ typescript-eslint(prefer-ts-expect-error): Enforce using `@ts-expect-error` over `@ts-ignore` | ||
╭─[prefer_ts_expect_error.tsx:2:1] | ||
1 │ | ||
2 │ ╭─▶ /* | ||
3 │ ╰─▶ // @ts-ignore in a block with single line comments */ | ||
4 │ | ||
╰──── | ||
help: Use "@ts-expect-error" to ensure an error is actually being suppressed. | ||
|