Skip to content

[bug] type check fails from missing NodeJS namespace #1308

@JstnMcBrd

Description

@JstnMcBrd

Describe the bug

This is a continuation of #1306

After updating to the beta version with the fix from #1307, TypeScript still throws build errors when type-checking @eslint-react/eslint-plugin. The type-fest error has been fixed, but the NodeJS error remains.

Is there a missing peer dependency of @types/node?

$ tsc

node_modules/@eslint-react/shared/dist/index.d.ts:28:25 - error TS2503: Cannot find namespace 'NodeJS'.

28 declare const _require: NodeJS.Require;
                           ~~~~~~


Found 1 error in node_modules/@eslint-react/shared/dist/index.d.ts:28

Reproduction

See this (updated) minimal reproduction: https://stackblitz.com/edit/eslint-react-eslint-plugin-1306

Expected behavior

Type check should pass.

Platform and versions

Node v24.11.0
TypeScript v5.9.3
ESLint v9.39.1
@eslint-react/eslint-plugin v2.3.3-beta.0

Additional context

Workaround: skipLibCheck: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: ReleasedThe issue has been releasedType: BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions