Skip to content
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

How can I use the command mode of npm run to perform checks? #223

Open
StarkL opened this issue Feb 10, 2023 · 0 comments
Open

How can I use the command mode of npm run to perform checks? #223

StarkL opened this issue Feb 10, 2023 · 0 comments

Comments

@StarkL
Copy link

StarkL commented Feb 10, 2023

I want to simulate the effect of TODO before Git commit like webStorm.

If TODO is detected, the commit action will be suspended, and the subsequent commit action will continue after the developer clicks to confirm.

Otherwise, the commit action will not be executed.

So I want to use husk+pre-commit to add an npm run checkTodo script to achieve my goal.

How can I use the command mode of npm run to perform checks?

  "husky": {
    "hooks": {
      "pre-commit": "npm run checkTodo && npm run lint"
    }
  }

I used the translation tool to translate Chinese into English, and did a little keyword repair. The sentence may not be very smooth, where you don't understand, please timely @ me.

Thanks!

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

No branches or pull requests

1 participant