feat: adding linter for commits
This commit is contained in:
6
node_modules/@commitlint/top-level/lib/index.d.ts
generated
vendored
Normal file
6
node_modules/@commitlint/top-level/lib/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export default toplevel;
|
||||
/**
|
||||
* Find the next git root
|
||||
*/
|
||||
declare function toplevel(cwd?: string): Promise<string | undefined>;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/@commitlint/top-level/lib/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@commitlint/top-level/lib/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,eAAe,QAAQ,CAAC;AAExB;;GAEG;AACH,iBAAe,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,+BAQnC"}
|
27
node_modules/@commitlint/top-level/lib/index.js
generated
vendored
Normal file
27
node_modules/@commitlint/top-level/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const find_up_1 = __importDefault(require("find-up"));
|
||||
exports.default = toplevel;
|
||||
/**
|
||||
* Find the next git root
|
||||
*/
|
||||
async function toplevel(cwd) {
|
||||
const found = await searchDotGit(cwd);
|
||||
if (typeof found !== 'string') {
|
||||
return found;
|
||||
}
|
||||
return path_1.default.join(found, '..');
|
||||
}
|
||||
/**
|
||||
* Search .git, the '.git' can be a file(submodule), also can be a directory(normal)
|
||||
*/
|
||||
async function searchDotGit(cwd) {
|
||||
const foundFile = await (0, find_up_1.default)('.git', { cwd, type: 'file' });
|
||||
const foundDir = await (0, find_up_1.default)('.git', { cwd, type: 'directory' });
|
||||
return foundFile || foundDir;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/@commitlint/top-level/lib/index.js.map
generated
vendored
Normal file
1
node_modules/@commitlint/top-level/lib/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,sDAAyB;AAEzB,kBAAe,QAAQ,CAAC;AAExB;;GAEG;AACH,KAAK,UAAU,QAAQ,CAAC,GAAY;IACnC,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC;IAEtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9B,OAAO,KAAK,CAAC;KACb;IAED,OAAO,cAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,YAAY,CAAC,GAAY;IACvC,MAAM,SAAS,GAAG,MAAM,IAAA,iBAAE,EAAC,MAAM,EAAE,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,MAAM,IAAA,iBAAE,EAAC,MAAM,EAAE,EAAC,GAAG,EAAE,IAAI,EAAE,WAAW,EAAC,CAAC,CAAC;IAE5D,OAAO,SAAS,IAAI,QAAQ,CAAC;AAC9B,CAAC"}
|
Reference in New Issue
Block a user