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

fix: lint nested folder #3616

Open
1 of 4 tasks
tomhoad opened this issue Jun 6, 2023 · 0 comments
Open
1 of 4 tasks

fix: lint nested folder #3616

tomhoad opened this issue Jun 6, 2023 · 0 comments

Comments

@tomhoad
Copy link

tomhoad commented Jun 6, 2023

Expected Behavior

commitlint should run to completion

Current Behavior

 git commit -m "this should fail"

⧗   input: this should fail
✖   Please add rules to your `commitlint.config.js`
    - Getting started guide: https://commitlint.js.org/#/?id=getting-started
    - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/index.js [empty-rules]

✖   found 1 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

husky - commit-msg hook exited with code 1 (error)

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Steps to Reproduce

mkdir test/package
cd test
git init
cd package
npm install --save-dev @commitlint/config-conventional @commitlint/cli
echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
npm install husky --save-dev
cd .. && npx husky install package/.husky
npx husky add package/.husky/commit-msg  'npx --no -- commitlint --edit ${1}'
cd package
git commit -m "this should fail"

⧗   input: this should fail
✖   Please add rules to your `commitlint.config.js`
    - Getting started guide: https://commitlint.js.org/#/?id=getting-started
    - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/index.js [empty-rules]

✖   found 1 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

husky - commit-msg hook exited with code 1 (error)

Context

My use case is that the project is a template folder that uses a nested folder as the template contents (specifically for the dotnet 'new' CLI). I want the template users to use commitlint in their templated projects.

commitlint --version

"@commitlint/cli": "^17.6.5",

git --version

git version 2.39.0.windows.1

node --version

v18.16.0

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

No branches or pull requests

2 participants