pnpm supports defining a package config in package.yaml in addition to package.json. If eslint.config.js uses ESM globals and package.yaml contains type: module, Inspector ignores that, assumes that a package is in the CJS format, and fails to recognize ESM globals in eslint.config.js (like import.meta.dirname).
I suppose that this is a bug of bundle-require, it infers the package format from package.json only. It's also possible to provide an option for Inspector to override inferred format instead.
pnpmsupports defining a package config inpackage.yamlin addition topackage.json. Ifeslint.config.jsuses ESM globals andpackage.yamlcontainstype: module, Inspector ignores that, assumes that a package is in the CJS format, and fails to recognize ESM globals ineslint.config.js(likeimport.meta.dirname).I suppose that this is a bug of
bundle-require, it infers the package format frompackage.jsononly. It's also possible to provide an option for Inspector to override inferredformatinstead.