Skip to content

Package/ESM compatibility linter (completed 💚) #116

@fregante

Description

@fregante

It's easy to publish a package, but does it work? Is it compatible? I'm looking for a tool that verifies:

  • can it be imported by node/webpack/parcel/rollup/typescript successfully?

With Node's ESM resolution introducing new constraints for ESM modules (type: 'module'), a lot of existing modules probably can't be imported successfully by it.

Edit: a GHA workflow would be useful, but currently you'd have to copy-paste the whole thing between repos.

Example config: https://github.com/fregante/webext-options-sync/blob/master/.github/workflows/esm-lint.yml
Example run: https://github.com/fregante/webext-options-sync/runs/388845886

I think it can be repackaged as module with https://github.com/SamVerschueren/listr so that failures can be caught and ignored

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions