From 1be38bef28f44c3d18f72183ea57ebfe91380b3c Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Sat, 23 May 2026 16:58:45 -0700 Subject: [PATCH] fix(eslint): also ignore .pnpmfile.cjs / .cjs (CommonJS by design) After the .venv ignore fix landed (commit 9be49acb), a different lint error surfaced in CI run 64: /dashboards/admin-web/.pnpmfile.cjs 1:12 error A `require()` style import is forbidden @typescript-eslint/no-require-imports 2:14 error A `require()` style import is forbidden @typescript-eslint/no-require-imports `.pnpmfile.cjs` is a pnpm hook that MUST be CommonJS; it cannot use ESM imports because pnpm loads it via Node's require() and the file is not part of the TypeScript source tree at all. The @typescript-eslint/no-require-imports rule should never apply to *.cjs files. Added two ignore patterns to the root config: '**/.pnpmfile.cjs' '**/*.cjs' The broader '*.cjs' glob also covers any future CommonJS config files (next.config.cjs, postcss.config.cjs, etc.). --- eslint.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eslint.config.js b/eslint.config.js index 545672f2..91dbc1c8 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -25,6 +25,11 @@ export default [ // these, but the root config is what runs in CI). '**/playwright-report/**', '**/test-results/**', + // .pnpmfile.cjs / .cjs config files use CommonJS require() by + // design and must not be linted with the TypeScript ESM rule set + // that forbids require-style imports. + '**/.pnpmfile.cjs', + '**/*.cjs', ], }, js.configs.recommended,