mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-04-20 03:02:51 -04:00
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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user