Can I use the steiger linter with lint-staged? #97
-
|
hi, I wanted to use the Steiger linter with lint-staged for pre-commit using husky. So I tried it by adding the lint-staged option in package.json like this: The error output to git log is as follows: ✖ steiger ./src: Options: Pass only one path to watch Sorry if this is a stupid question, but I would still appreciate your help.😔 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hello, thanks for the question! I don't think If you're using a pre-commit hook to validate your project before committing, then you should include the check alongside the call to |
Beta Was this translation helpful? Give feedback.
Hello, thanks for the question! I don't think
lint-stagedis the right tool to run Steiger, simply because of its specifics. The goal oflint-stagedis 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: