Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update typescript-eslint to v6.18.1 #15881

Merged
merged 8 commits into from Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions changelog_unreleased/typescript/15881.md
@@ -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){}
| ^
```
15 changes: 1 addition & 14 deletions cspell.json
Expand Up @@ -50,7 +50,6 @@
"cliify",
"cmds",
"codebases",
"Codecov",
"codemirror",
"codemod",
"codemods",
Expand Down Expand Up @@ -80,10 +79,8 @@
"Dolzhykov",
"Doshi",
"dotfile",
"dotfiles",
"duailibe",
"Duperron",
"eastasianwidth",
"Eemeli",
"ekkhus",
"elektronik",
Expand All @@ -96,7 +93,6 @@
"eslump",
"espree",
"esproposal",
"estree",
"execa",
"Fabio",
"fabiospampinato",
Expand All @@ -107,14 +103,12 @@
"Filipe",
"Fiorini",
"Fisker",
"fizzbuzz",
"flamegraph",
"foldgutter",
"formatprg",
"Friedly",
"frobble",
"ftest",
"fuzzer",
"Georgii",
"gettin",
"githook",
Expand Down Expand Up @@ -171,14 +165,11 @@
"Kasturi",
"kddnewton",
"Kearney",
"keyframes",
"keyof",
"Khatri",
"Konstantin",
"l’objectif",
"lcov",
"libdef",
"lilconfig",
"linebreak",
"linebreaks",
"lintstaged",
Expand Down Expand Up @@ -271,7 +262,6 @@
"Rects",
"Redeclaration",
"refmt",
"regexes",
"rhengles",
"Rubocop",
"ruleset",
Expand Down Expand Up @@ -303,7 +293,6 @@
"starturl",
"stylefmt",
"styleguides",
"stylelint",
"stylelintrc",
"Stylesheet",
"subal",
Expand Down Expand Up @@ -343,7 +332,6 @@
"unparenthesized",
"unparseable",
"Unrestrict",
"unstaged",
"upvoted",
"upvotes",
"valourous",
Expand All @@ -361,7 +349,6 @@
"webcompat",
"webstorm",
"Weixin",
"whitespaces",
"withastro",
"wxss",
"xdescribe",
Expand All @@ -374,7 +361,7 @@
"ignoreRegExpList": [
"<!-- prettier-ignore -->\\n(`{3,})\\w*\\n[\\s\\S]+?\\1",
"\\[(\\*{2})?@[-\\w]+?\\1\\]",
"by @[-\\w]+(?:, @[-\\w]+)?",
"by @[-\\w]+(?:, @[-\\w]+)*",
"ve{2,}r{2,}y",
"ve+r+y+long\\w*",
"\\(https?://.*?\\)",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -38,8 +38,8 @@
"@iarna/toml": "2.2.5",
"@prettier/is-es5-identifier-name": "0.2.0",
"@prettier/parse-srcset": "3.1.0",
"@typescript-eslint/typescript-estree": "6.17.0",
"@typescript-eslint/visitor-keys": "6.17.0",
"@typescript-eslint/typescript-estree": "6.18.1",
"@typescript-eslint/visitor-keys": "6.18.1",
"acorn": "8.11.3",
"acorn-jsx": "5.3.2",
"angular-estree-parser": "9.0.0",
Expand Down Expand Up @@ -116,7 +116,7 @@
"@types/file-entry-cache": "5.0.4",
"@types/find-cache-dir": "3.2.1",
"@types/jest": "29.5.8",
"@typescript-eslint/eslint-plugin": "6.17.0",
"@typescript-eslint/eslint-plugin": "6.18.1",
"benchmark": "2.1.4",
"browserslist": "4.22.2",
"browserslist-to-esbuild": "2.1.0",
Expand Down
@@ -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."
`;
@@ -0,0 +1,4 @@
try {
}
catch (e = 1) {
}
@@ -0,0 +1 @@
run_spec(import.meta, ["babel-ts", "typescript"]);