Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): update typescript-eslint to v6.18.1 (#15881)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fisker <lionkay@gmail.com>
- Loading branch information
1 parent
ff83d55
commit b4ed91b
Showing
15 changed files
with
456 additions
and
145 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#### Throw errors for invalid code (#15881 by @fisker, @Josh-Cena, @auvred) | ||
|
||
<!-- prettier-ignore --> | ||
```ts | ||
// Input | ||
1++; | ||
|
||
// Prettier stable | ||
1++; | ||
|
||
// Prettier main | ||
SyntaxError: Invalid left-hand side expression in unary operation (1:1) | ||
> 1 | 1++; | ||
| ^ | ||
``` | ||
|
||
<!-- prettier-ignore --> | ||
```ts | ||
// Input | ||
try {} catch (error = 1){} | ||
|
||
// Prettier stable | ||
try { | ||
} catch (error) {} | ||
|
||
// Prettier main | ||
SyntaxError: Catch clause variable cannot have an initializer. (1:23) | ||
> 1 | try {} catch (error = 1){} | ||
| ^ | ||
``` |
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
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
23 changes: 23 additions & 0 deletions
23
...mat/misc/errors/typescript/catch-clause-with-initializer/__snapshots__/jsfmt.spec.js.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,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`catch-clause-with-initializer.ts [babel-ts] format 1`] = ` | ||
"Unexpected token, expected ")" (3:10) | ||
1 | try { | ||
2 | } | ||
> 3 | catch (e = 1) { | ||
| ^ | ||
4 | } | ||
5 | | ||
Cause: Unexpected token, expected ")" (3:9)" | ||
`; | ||
|
||
exports[`catch-clause-with-initializer.ts [typescript] format 1`] = ` | ||
"Catch clause variable cannot have an initializer. (3:12) | ||
1 | try { | ||
2 | } | ||
> 3 | catch (e = 1) { | ||
| ^ | ||
4 | } | ||
5 | | ||
Cause: Catch clause variable cannot have an initializer." | ||
`; |
4 changes: 4 additions & 0 deletions
4
...mat/misc/errors/typescript/catch-clause-with-initializer/catch-clause-with-initializer.ts
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,4 @@ | ||
try { | ||
} | ||
catch (e = 1) { | ||
} |
1 change: 1 addition & 0 deletions
1
tests/format/misc/errors/typescript/catch-clause-with-initializer/jsfmt.spec.js
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 @@ | ||
run_spec(import.meta, ["babel-ts", "typescript"]); |
Oops, something went wrong.