Skip to content

broken in Node.js v23.5.0+ #10

Closed

Description

@boneskull

Hi,

This PR changed what appears in module.builtinModules (docs) such that prefix-only modules are now included.

This means for a module like node:test, the rule fails. I suppose the fix would be to exempt node:-prefixed module names from the check.

I can send a fix if you'd like.

Activity

  1. added
    bugSomething isn't working
    help wantedExtra attention is needed
    and removed
    help wantedExtra attention is needed
    on May 13, 2025
  2. self-assigned this
    on May 13, 2025
  3. kytta commented on May 13, 2025

    @kytta
    Owner

    Oh, just noticed the last sentence. Yes, if you would submit a PR, that would be awesome! If not, no worries; I'll see if I can fix it during this week

  4. assigned and unassigned on May 13, 2025
  5. ljharb commented on May 13, 2025

    @ljharb

    You may also want to consider using https://npmjs.com/is-core-module since it'll have much more reliable results than node's builtinModules list, and, it will work for an arbitrary node version, which for a project might not be the same one that's running eslint.

  6. kytta commented on May 13, 2025

    @kytta
    Owner

    You may also want to consider using https://npmjs.com/is-core-module

    I don't like how it uses two extra dependencies for something that simplistic

    [...] it'll have much more reliable results than node's builtinModules list, and, it will work for an arbitrary node version, which for a project might not be the same one that's running eslint.

    But this is a valid concern and should be looked into

  7. ljharb commented on May 13, 2025

    @ljharb

    ¯\_(ツ)_/¯ it's clearly not that simple. up to you tho.

  8. added a commit that references this issue on May 13, 2025
    184a4e8
  9. boneskull commented on May 13, 2025

    @boneskull
    ContributorAuthor

    Created #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions