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
$ echo 'hello' | commitlint
/usr/local/lib/node_modules/@commitlint/cli/lib/cli.js:67
throw err;
^
Error: Cannot find module '@commitlint/config-angular'
at Function.Module._resolveFilename (module.js:527:15)
at resolveFileName (/usr/local/lib/node_modules/@commitlint/cli/node_modules/resolve-from/index.js:17:39)
at resolveFrom (/usr/local/lib/node_modules/@commitlint/cli/node_modules/resolve-from/index.js:31:9)
at module.exports (/usr/local/lib/node_modules/@commitlint/cli/node_modules/resolve-from/index.js:34:41)
at resolveId (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:108:35)
at resolveConfig (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:99:18)
at /usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:50:18
at Array.reduce (<anonymous>)
at loadExtends (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:48:32)
at resolveExtends (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:31:17)
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
module.exports = {extends: ['@commitlint/config-angular']}
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
| Executable |
Version |
commitlint --version |
5.0.0 |
git --version |
2.13.5 |
node --version |
v8.7.0 |
Expected Behavior
I expect to run
echo 'hello world' | commitlintunder 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-angularecho "module.exports = {extends: ['@commitlint/config-angular']}" > ~/commitlint.config.jsecho 'hello world' | commitlintcommitlint.config.js
Context
Being able to run
commintlintglobally without the need to have a config file on every repo I want to run it.Your Environment
commitlint --versiongit --versionnode --version