schematics icon indicating copy to clipboard operation
schematics copied to clipboard

pre-commit hook is broken after prettier schematic

Open Markus-Ende opened this issue 5 years ago • 0 comments

Prettier schematic creates this hook in .huskyrc:

"pre-commit": "pretty-quick --staged && lint-staged"

lint-staged needs a config file since v3.1 Since this is not generated, commiting fails with this error message:

Config could not be found.

Please make sure you have created it correctly.
See https://github.com/okonet/lint-staged#configuration.

Possible fixes:

  1. create minimal lint-staged config file
  2. remove lint-staged from pre-commit hook: "pre-commit": "pretty-quick --staged"

Markus-Ende avatar Dec 18 '19 12:12 Markus-Ende