Skip to content

Can I use the steiger linter with lint-staged? #97

Answered by illright
OhSeungWan asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, thanks for the question! I don't think lint-staged is the right tool to run Steiger, simply because of its specifics. The goal of lint-staged is to let you check the changed files individually, while Steiger is built to run on the entire project, not only the changed files.

If you're using a pre-commit hook to validate your project before committing, then you should include the check alongside the call to lint-staged. For example, with Husky, the script could look like this:

npx lint-staged
npx steiger ./src

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@OhSeungWan
Comment options

Answer selected by OhSeungWan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants