Skip to content

Incorrectly assumes the format of a package with package.yaml #149

@fluiderson

Description

@fluiderson

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.

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