Skip to content

Migrating to ES modules #2718

Open
Open
@43081j

Description

@43081j

Now that all LTS versions of node other than 18.x (which is soon to fall out of LTS) support require(esm), it means we should be able to move to ES modules.

ESLint will internally already import(module) plugins when used by legacy eslintrc configs.

So the people this would affect are those using CommonJS flat configs in a version of Node below 20.

Given they're already using a version of ESLint which supports flat config, they could quite easily move their config to eslint.config.mjs without having to migrate their whole repo to ES modules.

This all tells me it should be a fairly safe move to change this repo to type: "module". What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions