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.).
@@ -19,6 +25,8 @@ export default defineConfig([
1925 gcUntil : "readonly" ,
2026 experimentalFeatures : "readonly" ,
2127 onUncaughtException : "readonly" ,
28+ napiVersion : "readonly" ,
29+ skipTest : "readonly" ,
2230 } ,
2331 } ,
2432 rules : {
@@ -44,4 +52,16 @@ export default defineConfig([
4452 ] ,
4553 } ,
4654 } ,
55+ {
56+ files : [
57+ "implementors/**/*.{js,ts}" ,
58+ "scripts/**/*.{js,mjs}" ,
59+ ] ,
60+ languageOptions : {
61+ globals : {
62+ ...globals . es2025 ,
63+ ...globals . node ,
64+ } ,
65+ } ,
66+ } ,
4767] ) ;
0 commit comments