Skip to content

Conversation

@donaminos
Copy link
Contributor

Description

The instructions regarding local setup wee a bit confusing, particularly in the "Add hook" section where npx was used to run commitlint instead of the locally installed package.

I have updated the instructions to provide greater clarity and accommodate those who prefer a 100% local setup. The revised steps now include guidance on utilizing the locally installed commitlint package.

Motivation and Context

When I read the documentation to use commitlint I was confused by the local setup using npx to run the command instead of the package installed locally

Usage examples

npm pkg set scripts.commitlint="commitlint --edit"
npx husky add .husky/commit-msg 'npm run commitlint ${1}'

How Has This Been Tested?

Follow the instructions on the doc, section Add hooks:

npm pkg set scripts.commitlint="commitlint --edit"
npx husky add .husky/commit-msg 'npm run commitlint ${1}'

Everything is working as before.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@escapedcat
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants