11import { defineConfig , globalIgnores } from "eslint/config" ;
22import globals from "globals" ;
3+ import eslint from '@eslint/js' ;
4+ import tseslint from 'typescript-eslint' ;
35
46export 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.).
@@ -18,6 +24,8 @@ export default defineConfig([
1824 gcUntil : "readonly" ,
1925 spawnTest : "readonly" ,
2026 experimentalFeatures : "readonly" ,
27+ napiVersion : "readonly" ,
28+ skipTest : "readonly" ,
2129 } ,
2230 } ,
2331 rules : {
@@ -31,4 +39,16 @@ export default defineConfig([
3139 ] ,
3240 } ,
3341 } ,
42+ {
43+ files : [
44+ "implementors/**/*.{js,ts}" ,
45+ "scripts/**/*.{js,mjs}" ,
46+ ] ,
47+ languageOptions : {
48+ globals : {
49+ ...globals . es2025 ,
50+ ...globals . node ,
51+ } ,
52+ } ,
53+ } ,
3454] ) ;
0 commit comments