Skip to content

Commit adbf49c

Browse files
authored
fix: update espree to v11 (#390)
1 parent 9c4d127 commit adbf49c

4 files changed

Lines changed: 54 additions & 22 deletions

File tree

package-lock.json

Lines changed: 51 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"codemirror": "^6.0.2",
6262
"eslint-linter-browserify": "^9.39.2",
6363
"eslint-scope": "^8.4.0",
64-
"espree": "^10.4.0",
64+
"espree": "^11.2.0",
6565
"esquery": "^1.7.0",
6666
"graphviz-react": "^1.2.5",
6767
"lucide-react": "^0.577.0",
@@ -77,7 +77,6 @@
7777
"@playwright/test": "^1.58.2",
7878
"@rolldown/plugin-babel": "^0.2.2",
7979
"@types/eslint-scope": "^8.4.0",
80-
"@types/espree": "^10.1.0",
8180
"@types/esquery": "^1.5.4",
8281
"@types/node": "^20.19.37",
8382
"@types/react": "^19.2.14",

src/hooks/use-ast.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export function useAST() {
3232
loc: true,
3333
comment: true,
3434
tokens: true,
35-
// @ts-expect-error mismatch between the latest release of `espree` and `@types/espree`.
3635
ecmaVersion: jsOptions.esVersion,
3736
sourceType: jsOptions.sourceType,
3837
ecmaFeatures: {

src/hooks/use-explorer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
StateStorage,
66
createJSONStorage,
77
} from "zustand/middleware";
8-
import type { Options } from "espree";
8+
import type { EcmaVersion, Options } from "espree";
99
import {
1010
defaultCode,
1111
defaultJsOptions,
@@ -18,7 +18,7 @@ import {
1818
} from "../lib/const";
1919

2020
export type SourceType = Exclude<Options["sourceType"], undefined>;
21-
export type Version = Exclude<Options["ecmaVersion"], undefined> | 17 | 2026;
21+
export type Version = EcmaVersion;
2222
export type Language = "javascript" | "json" | "markdown" | "css" | "html";
2323
export type JsonMode = "json" | "jsonc" | "json5";
2424
export type MarkdownMode = "commonmark" | "gfm";

0 commit comments

Comments
 (0)