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

feat(commitlint): add additional search path for @commitlint #454

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(commitlint): add additional search path for @commitlint
This change allows opencommit to locate commitlint installed globally
(with opencommit), which is useful for project that does not use node.js
environment or dose not have opencommit and @commitlint installed locally.
  • Loading branch information
jcppkkk committed Mar 17, 2025
commit 44bd14d2c52a24fbff0fd92f813ac5e6cc5eddd2
3 changes: 2 additions & 1 deletion src/modules/commitlint/pwd-commitlint.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@ import path from 'path';
const findModulePath = (moduleName: string) => {
const searchPaths = [
path.join('node_modules', moduleName),
path.join('node_modules', '.pnpm')
path.join('node_modules', '.pnpm'),
path.resolve(__dirname, '../..')
];

for (const basePath of searchPaths) {
Loading
Oops, something went wrong.