Skip to content

Commit af45d9e

Browse files
build: bump eslint and @typescript-eslint to v8 line
The previous @typescript-eslint 5.58 and eslint 7.32 stack predated TypeScript 5.x, and @typescript-eslint warned at startup that the installed TS version was not officially supported. Bump eslint to ^8.57 and @typescript-eslint to ^8.57 — the latter officially supports TS 5.x, which matches the recent TS bump. The v8 rename surfaces a few rule-name changes that need to be applied where the codebase used eslint-disable comments: - @typescript-eslint/no-var-requires → no-require-imports - @typescript-eslint/ban-types → no-unsafe-function-type for the Function-type uses in benchmark.js-plugin's add() overloads Add a one-line disable for an intentionally-side-effecting expression in benchmark.js-plugin/benches/sample.ts that the v8 recommended config now flags as @typescript-eslint/no-unused-expressions. Refs COD-2721 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 84a26e9 commit af45d9e

6 files changed

Lines changed: 1358 additions & 697 deletions

File tree

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
"@rollup/plugin-typescript": "^11.1.5",
2121
"@types/jest": "^29.5.0",
2222
"@types/node": "^20.5.1",
23-
"@typescript-eslint/eslint-plugin": "^5.58.0",
24-
"@typescript-eslint/parser": "^5.58.0",
23+
"@typescript-eslint/eslint-plugin": "^8.57.0",
24+
"@typescript-eslint/parser": "^8.57.0",
2525
"esbuild": "^0.17.16",
2626
"esbuild-register": "^3.4.2",
27-
"eslint": "^7.32.0",
28-
"eslint-import-resolver-typescript": "^3.5.5",
29-
"eslint-plugin-import": "^2.27.5",
27+
"eslint": "^8.57.1",
28+
"eslint-import-resolver-typescript": "^3.6.3",
29+
"eslint-plugin-import": "^2.32.0",
3030
"husky": "^7.0.4",
3131
"jest": "^29.5.0",
3232
"jest-config": "^29.5.0",

packages/benchmark.js-plugin/benches/sample.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ suite
1616
/o/.test("Hello World!");
1717
})
1818
.add("String#indexOf", function () {
19+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
1920
"Hello World!".indexOf("o") > -1;
2021
})
2122
.add("short body", () => {

packages/benchmark.js-plugin/src/buildSuiteAdd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export default function buildSuiteAdd(suite: Suite) {
2222
}
2323

2424
function add(options: Options): Suite;
25-
// eslint-disable-next-line @typescript-eslint/ban-types
25+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
2626
function add(fn: Function, options?: Options): Suite;
2727
function add(name: string, options?: Options): Suite;
28-
// eslint-disable-next-line @typescript-eslint/ban-types
28+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
2929
function add(name: string, fn: Function, options?: Options): Suite;
3030
function add(name: unknown, fn?: unknown, opts?: unknown) {
3131
// 1 argument: (options: Options)

packages/core/src/native_core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface NativeCoreWithBindingStatus extends NativeCore {
1313

1414
let native_core: NativeCoreWithBindingStatus;
1515
try {
16-
// eslint-disable-next-line @typescript-eslint/no-var-requires
16+
// eslint-disable-next-line @typescript-eslint/no-require-imports
1717
const nativeCore = require("node-gyp-build")(
1818
path.dirname(__dirname),
1919
) as NativeCore;

packages/core/tests/index.integ.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
1+
/* eslint-disable @typescript-eslint/no-require-imports */
22
export {}; // Make this a module
33

44
beforeEach(() => {

0 commit comments

Comments
 (0)