Skip to content

Custom linters fail to load because @ruby/prism isn't installedย #1756

Description

@asilano

We have some custom linters defined (which have previously worked properly). When running the linter, I now get errors:

> npx @herb-tools/linter@latest
โœ“ Using Herb config file at /Users/asilano/project/.herb.yml
Error loading rule file "/Users/asilano/project/.herb/rules/erb_deprecated_form_builder.mjs": Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@ruby/prism' imported from /Users/asilano/project/node_modules/@herb-tools/linter/dist/index.js

I see that @ruby/prism is only a devDependency of @herb-tools/core, so it hasn't been installed along with Herb.

Question:
Should @ruby/prism be a full dependency of Herb, or should the docs be updated to note that it needs to be added to a project's packages if custom linters are defined?

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