Skip to content

Repo: Enable commonjs require by adding main to package.json #7300

Closed as not planned
@ghmcadams

Description

@ghmcadams

Suggestion

I am the maintainer of LintLens (a vscode extension that allows developers to see metadata for their ESLint configs). In order to read the metadata of rules which live in plugins like this one, LintLens uses require to synchronously load the plugin at runtime from the developer's local machine. When developers update @typescript-eslint/eslint-plugin to v6.1.0, the require() call in LintLens fails to find the module. Adding main to package.json fixes this issue.

There is no downside to this change, as node will ignore main when exports exists.

I created a proactive PR (#7301) for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestions! (i.e. not a bug / enhancment / documentation)unable to reproissues that a maintainer was not able to reproducewontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions