Skip to content

Commit d7e56d5

Browse files
committedMar 13, 2025
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.
1 parent 7feb3ec commit d7e56d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/modules/commitlint/pwd-commitlint.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import path from 'path';
44
const findModulePath = (moduleName: string) => {
55
const searchPaths = [
66
path.join('node_modules', moduleName),
7-
path.join('node_modules', '.pnpm')
7+
path.join('node_modules', '.pnpm'),
8+
path.resolve(__dirname, '../..')
89
];
910

1011
for (const basePath of searchPaths) {

0 commit comments

Comments
 (0)
Failed to load comments.