feat: adding linter for commits

This commit is contained in:
Carlos Gutierrez
2021-11-22 09:39:27 -06:00
commit 2c7c117aa1
3093 changed files with 1215197 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import { Matcher } from '@commitlint/types';
export declare const wildcards: Matcher[];
//# sourceMappingURL=defaults.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAe1C,eAAO,MAAM,SAAS,EAAE,OAAO,EAW9B,CAAC"}

43
node_modules/@commitlint/is-ignored/lib/defaults.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.wildcards = void 0;
const semver = __importStar(require("semver"));
const isSemver = (c) => {
const firstLine = c.split('\n').shift();
if (typeof firstLine !== 'string') {
return false;
}
const stripped = firstLine.replace(/^chore(\([^)]+\))?:/, '').trim();
return semver.valid(stripped) !== null;
};
const test = (r) => r.test.bind(r);
exports.wildcards = [
test(/^((Merge pull request)|(Merge (.*?) into (.*?)|(Merge branch (.*?)))(?:\r?\n)*$)/m),
test(/^(R|r)evert (.*)/),
test(/^(fixup|squash)!/),
isSemver,
test(/^(Merged (.*?)(in|into) (.*)|Merged PR (.*): (.*))/),
test(/^Merge remote-tracking branch(\s*)(.*)/),
test(/^Automatic merge(.*)/),
test(/^Auto-merged (.*?) into (.*)/),
];
//# sourceMappingURL=defaults.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAGjC,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAW,EAAE;IACvC,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;IAExC,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QAClC,OAAO,KAAK,CAAC;KACb;IAED,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACrE,OAAO,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,CAAS,EAA4B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAExD,QAAA,SAAS,GAAc;IACnC,IAAI,CACH,mFAAmF,CACnF;IACD,IAAI,CAAC,kBAAkB,CAAC;IACxB,IAAI,CAAC,kBAAkB,CAAC;IACxB,QAAQ;IACR,IAAI,CAAC,oDAAoD,CAAC;IAC1D,IAAI,CAAC,wCAAwC,CAAC;IAC9C,IAAI,CAAC,sBAAsB,CAAC;IAC5B,IAAI,CAAC,8BAA8B,CAAC;CACpC,CAAC"}

3
node_modules/@commitlint/is-ignored/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export * from './is-ignored';
export { default } from './is-ignored';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC"}

20
node_modules/@commitlint/is-ignored/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = void 0;
__exportStar(require("./is-ignored"), exports);
var is_ignored_1 = require("./is-ignored");
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(is_ignored_1).default; } });
//# sourceMappingURL=index.js.map

1
node_modules/@commitlint/is-ignored/lib/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,2CAAqC;AAA7B,sHAAA,OAAO,OAAA"}

View File

@@ -0,0 +1,3 @@
import { IsIgnoredOptions } from '@commitlint/types';
export default function isIgnored(commit?: string, opts?: IsIgnoredOptions): boolean;
//# sourceMappingURL=is-ignored.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"is-ignored.d.ts","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,SAAS,CAChC,MAAM,GAAE,MAAW,EACnB,IAAI,GAAE,gBAAqB,GACzB,OAAO,CAqBT"}

19
node_modules/@commitlint/is-ignored/lib/is-ignored.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const defaults_1 = require("./defaults");
function isIgnored(commit = '', opts = {}) {
const ignores = typeof opts.ignores === 'undefined' ? [] : opts.ignores;
if (!Array.isArray(ignores)) {
throw new Error(`ignores must be of type array, received ${ignores} of type ${typeof ignores}`);
}
const invalids = ignores.filter((c) => typeof c !== 'function');
if (invalids.length > 0) {
throw new Error(`ignores must be array of type function, received items of type: ${invalids
.map((i) => typeof i)
.join(', ')}`);
}
const base = opts.defaults === false ? [] : defaults_1.wildcards;
return [...base, ...ignores].some((w) => w(commit));
}
exports.default = isIgnored;
//# sourceMappingURL=is-ignored.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"is-ignored.js","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":";;AAAA,yCAAqC;AAGrC,SAAwB,SAAS,CAChC,SAAiB,EAAE,EACnB,OAAyB,EAAE;IAE3B,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IAExE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CACd,2CAA2C,OAAO,YAAY,OAAO,OAAO,EAAE,CAC9E,CAAC;KACF;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC;IAEhE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACxB,MAAM,IAAI,KAAK,CACd,mEAAmE,QAAQ;aACzE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;aACpB,IAAI,CAAC,IAAI,CAAC,EAAE,CACd,CAAC;KACF;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAS,CAAC;IACtD,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrD,CAAC;AAxBD,4BAwBC"}