Skip to content

Commit 1716eb6

Browse files
authored
chore: apply eslint to ts files (#49)
1 parent d4adad0 commit 1716eb6

File tree

4 files changed

+424
-22
lines changed

4 files changed

+424
-22
lines changed

eslint.config.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import { defineConfig, globalIgnores } from "eslint/config";
22
import globals from "globals";
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
35

46
export default defineConfig([
5-
globalIgnores(["node"]),
7+
globalIgnores(["**/CMakeFiles/**"]),
8+
eslint.configs.recommended,
9+
tseslint.configs.recommended,
610
{
7-
files: ["tests/**/*.js"],
11+
files: [
12+
"tests/**/*.js",
13+
],
814
languageOptions: {
915
// Only allow ECMAScript built-ins and CTS harness globals.
1016
// This causes no-undef to flag any runtime-specific API (setTimeout, process, Buffer, etc.).
@@ -30,4 +36,16 @@ export default defineConfig([
3036
],
3137
},
3238
},
39+
{
40+
files: [
41+
"implementors/**/*.{js,ts}",
42+
"scripts/**/*.{js,mjs}",
43+
],
44+
languageOptions: {
45+
globals: {
46+
...globals.es2025,
47+
...globals.node,
48+
},
49+
},
50+
},
3351
]);

implementors/node/run-tests.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,6 @@ import { listDirectoryEntries, runFileInSubprocess } from "./tests.ts";
66
const ROOT_PATH = path.resolve(import.meta.dirname, "..", "..");
77
const TESTS_ROOT_PATH = path.join(ROOT_PATH, "tests");
88

9-
const ASSERT_MODULE_PATH = path.join(
10-
ROOT_PATH,
11-
"implementors",
12-
"node",
13-
"assert.js"
14-
);
15-
const LOAD_ADDON_MODULE_PATH = path.join(
16-
ROOT_PATH,
17-
"implementors",
18-
"node",
19-
"load-addon.js"
20-
);
21-
229
async function populateSuite(
2310
testContext: TestContext,
2411
dir: string

0 commit comments

Comments
 (0)