Skip to content

Make js-lint self-contained by invoking the bundled Prettier CLI #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
CDeltakai opened this issue May 8, 2025 · 2 comments · Fixed by #21
Open

Make js-lint self-contained by invoking the bundled Prettier CLI #20

CDeltakai opened this issue May 8, 2025 · 2 comments · Fixed by #21
Assignees
Labels
development Standard development

Comments

@CDeltakai
Copy link
Contributor

Specification

Projects that don’t list Prettier as a direct dev-dependency fail during the “prettier” phase with spawnSync prettier ENOENT.
This happens because the linter calls prettier by name and the binary is only present in node_modules/.bin when a repo installs Prettier itself or when npm hoists it to the top level.

Making the linter call the bundled Prettier binary guarantees:

  • Zero setup – repos only install @matrixai/lint.
  • Consistent Prettier version across all projects.
  • No accidental breakage when npm’s hoisting rules change.

Additional context

Tasks

  1. Make the matrixai-lint command invoke the bundled Prettier rather than the target repo's Prettier
@CDeltakai CDeltakai added the development Standard development label May 8, 2025
Copy link

linear bot commented May 8, 2025

ENG-617

@CMCDragonkai
Copy link
Member

Close this if this is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development
Development

Successfully merging a pull request may close this issue.

2 participants