2

I just started the project and followed the documentation (https://typicode.github.io/husky/#/), where I applied the following steps:

  1. npx husky-init && yarn # Yarn 1

  2. npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'

After that, I edited the created file, after command (2), looking like this:

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo "HOOK PRE-COMMIT"

yarn lint-check
yarn prettier-check

Okay, after that I did two types of tests, which were:

  1. With prettier + eslint applied throughout the project (No error or warning)

  2. Without prettier + eslint applied throughout the project (With warning)

And in both tests, when committing the code, I always get the same error below: enter image description here

What is happening?

I use the following config:

  • Ubuntu 20.04 LTS
  • VSCode
  • Yarn 1.22.11
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
THIAGO DE BONIS
  • 760
  • 7
  • 22

0 Answers0