-
Notifications
You must be signed in to change notification settings - Fork 933
Allow running globally installed commitlint and config-angular from anywhere #126
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
Closed
2 of 4 tasks
Labels
Comments
Just reproduced it. This should work, I guess this is broken by our |
marionebl
added a commit
that referenced
this issue
Nov 18, 2017
marionebl
added a commit
that referenced
this issue
Nov 19, 2017
* chore: avoid gpg password prompt * test(core): add failing test case for global extends resolving * fix(core): fall back to globally installed config if available #126 * test: use cwd correctly for git config * test: improve testability of global fallback * fix(core): ensure resolve-globals is detected as dependency * fix: use more recent import-fresh * fix: fall back to require-uncached Avoid sindresorhus/import-fresh#6 for the time being * fix: pull in patch releases
Steps to reproduce create this result as of 5.0.1: npm install -g @commitlint/cli @commitlint/config-angular
echo "module.exports = {extends: ['@commitlint/config-angular']}" > ~/commitlint.config.js
echo 'hello world' | commitlint
⧗ input: hello world
✖ message may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
echo 'test: some message' | commitlint
⧗ input: test: hello world
✔ found 0 problems, 0 warnings |
Awesome! Thanks! |
2 tasks
@marionebl I currently manually copy the config file from the home dir to each separate repo dir. Can commitlint be configured to use the former right away? |
@xquilt does this work?: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
I expect to run
echo 'hello world' | commitlint
under any directory where that will be analysed against the config-angular preset which was globally installed.Current Behavior
Affected packages
Possible Solution
Follow Less or ESLint which offer options to run their plugins also installed globally.
Steps to Reproduce (for bugs)
npm install -g @commitlint/cli @commitlint/config-angular
echo "module.exports = {extends: ['@commitlint/config-angular']}" > ~/commitlint.config.js
echo 'hello world' | commitlint
commitlint.config.js
Context
Being able to run
commintlint
globally without the need to have a config file on every repo I want to run it.Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: