W
W
wakenbyWork2021-11-30 13:07:03
git
wakenbyWork, 2021-11-30 13:07:03

Set up husky lint-staged does it work weird?

"husky": {
  "hooks": {
    "pre-commit": "lint-staged"
  }
},
"lint-staged": {
  "*.scss": [
    "stylelint --fix"
  ],
  "*.js": [
    "eslint --fix"
  ]
}


I am deploying a project, and if I first install npm dependencies and then initialize git, then the hooks will not work.

But if, after deploying the project, first initialize git and then install the dependencies, then everything will work.

Is that how it should work?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question