fix: support node globals in scripts (#109)

This commit is contained in:
Brandon Keiji 2025-04-21 23:10:25 -07:00 committed by GitHub
parent 1eeadcd85c
commit 98fa8d2b51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -173,6 +173,16 @@ export default tseslint.config(
],
},
},
// extra settings for scripts that we run directly with node
{
files: ['./scripts/**/*.js'],
languageOptions: {
globals: {
process: 'readonly',
console: 'readonly',
},
},
},
// Prettier config must be last
prettierConfig,
// Custom eslint rules for this repo

View File

@ -4,7 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
/* eslint-disable no-undef */
import fs from 'fs';
import path from 'path';
import os from 'os'; // Import os module