chore: consistently import node modules with prefix (#3013)

Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
Pascal Birchler
2025-08-25 22:11:27 +02:00
committed by GitHub
parent 415d3413c4
commit ee4feea006
168 changed files with 420 additions and 405 deletions

View File

@@ -13,7 +13,7 @@ import importPlugin from 'eslint-plugin-import';
import vitest from '@vitest/eslint-plugin';
import globals from 'globals';
import licenseHeader from 'eslint-plugin-license-header';
import path from 'node:path'; // Use node: prefix for built-ins
import path from 'node:path';
import url from 'node:url';
// --- ESM way to get __dirname ---
@@ -175,6 +175,7 @@ export default tseslint.config(
files: ['./**/*.{tsx,ts,js}'],
plugins: {
'license-header': licenseHeader,
import: importPlugin,
},
rules: {
'license-header/header': [
@@ -187,6 +188,7 @@ export default tseslint.config(
' */',
],
],
'import/enforce-node-protocol-usage': ['error', 'always'],
},
},
// extra settings for scripts that we run directly with node