@forsakringskassan/commitlint-config 1.4.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/bin/commitlint.js +0 -0
- package/bin/install.js +0 -0
- package/bin/lint-staged.js +12 -0
- package/dist/commitlint.js +68 -97
- package/lint-staged.js +17 -0
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -53,3 +53,19 @@ As a husky hook:
|
|
|
53
53
|
```bash
|
|
54
54
|
echo 'npm exec commitlint -- --edit "$1"' > .husky/commit-msg
|
|
55
55
|
```
|
|
56
|
+
|
|
57
|
+
### Lint staged
|
|
58
|
+
|
|
59
|
+
This package bundles `lint-staged` and can be used with a preconfigured setup.
|
|
60
|
+
Assuming husky is used add `.husky/pre-commit` with:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
configfile=$(node -p 'require.resolve("@forsakringskassan/commitlint-config/lint-staged")')
|
|
64
|
+
npm exec lint-staged -- --config "${configfile}" "$@"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If you already have `lint-staged` in your `package.json` you should remove it:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm rm lint-staged
|
|
71
|
+
```
|
package/bin/commitlint.js
CHANGED
|
File without changes
|
package/bin/install.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const binary = fileURLToPath(import.meta.resolve("lint-staged/bin"));
|
|
7
|
+
|
|
8
|
+
spawn("node", [binary, ...process.argv.slice(2)], {
|
|
9
|
+
stdio: "inherit",
|
|
10
|
+
}).on("exit", (code) => {
|
|
11
|
+
process.exit(code);
|
|
12
|
+
});
|
package/dist/commitlint.js
CHANGED
|
@@ -238211,7 +238211,7 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
|
238211
238211
|
return cp;
|
|
238212
238212
|
}
|
|
238213
238213
|
setStrict(strict) {
|
|
238214
|
-
this.state.strict = strict, strict && (this.state.strictErrors.forEach(([toParseError,
|
|
238214
|
+
this.state.strict = strict, strict && (this.state.strictErrors.forEach(([toParseError, at]) => this.raise(toParseError, at)), this.state.strictErrors.clear());
|
|
238215
238215
|
}
|
|
238216
238216
|
curContext() {
|
|
238217
238217
|
return this.state.context[this.state.context.length - 1];
|
|
@@ -238569,9 +238569,9 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
|
238569
238569
|
const opening = this.input[this.state.pos], { str, firstInvalidLoc, pos, curLine, lineStart } = readStringContents("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
|
|
238570
238570
|
this.state.pos = pos + 1, this.state.lineStart = lineStart, this.state.curLine = curLine, firstInvalidLoc && (this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, this.sourceToOffsetPos(firstInvalidLoc.pos))), 96 === this.input.codePointAt(pos) ? this.finishToken(24, firstInvalidLoc ? null : opening + str + "`") : (this.state.pos++, this.finishToken(25, firstInvalidLoc ? null : opening + str + "${"));
|
|
238571
238571
|
}
|
|
238572
|
-
recordStrictModeErrors(toParseError,
|
|
238573
|
-
const index =
|
|
238574
|
-
this.state.strict && !this.state.strictErrors.has(index) ? this.raise(toParseError,
|
|
238572
|
+
recordStrictModeErrors(toParseError, at) {
|
|
238573
|
+
const index = at.index;
|
|
238574
|
+
this.state.strict && !this.state.strictErrors.has(index) ? this.raise(toParseError, at) : this.state.strictErrors.set(index, [toParseError, at]);
|
|
238575
238575
|
}
|
|
238576
238576
|
readWord1(firstCode) {
|
|
238577
238577
|
this.state.containsEsc = false;
|
|
@@ -238606,19 +238606,19 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
|
238606
238606
|
const { type } = this.state;
|
|
238607
238607
|
tokenIsKeyword(type) && this.state.containsEsc && this.raise(Errors.InvalidEscapedReservedWord, this.state.startLoc, { reservedWord: tokenLabelName(type) });
|
|
238608
238608
|
}
|
|
238609
|
-
raise(toParseError,
|
|
238610
|
-
const error = toParseError(
|
|
238609
|
+
raise(toParseError, at, details = {}) {
|
|
238610
|
+
const error = toParseError(at instanceof Position ? at : at.loc.start, details);
|
|
238611
238611
|
if (!this.options.errorRecovery) throw error;
|
|
238612
238612
|
return this.isLookahead || this.state.errors.push(error), error;
|
|
238613
238613
|
}
|
|
238614
|
-
raiseOverwrite(toParseError,
|
|
238615
|
-
const loc =
|
|
238614
|
+
raiseOverwrite(toParseError, at, details = {}) {
|
|
238615
|
+
const loc = at instanceof Position ? at : at.loc.start, pos = loc.index, errors = this.state.errors;
|
|
238616
238616
|
for (let i = errors.length - 1; i >= 0; i--) {
|
|
238617
238617
|
const error = errors[i];
|
|
238618
238618
|
if (error.loc.index === pos) return errors[i] = toParseError(loc, details);
|
|
238619
238619
|
if (error.loc.index < pos) break;
|
|
238620
238620
|
}
|
|
238621
|
-
return this.raise(toParseError,
|
|
238621
|
+
return this.raise(toParseError, at, details);
|
|
238622
238622
|
}
|
|
238623
238623
|
updateContext(prevType) {
|
|
238624
238624
|
}
|
|
@@ -238689,9 +238689,9 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
|
238689
238689
|
constructor(type) {
|
|
238690
238690
|
super(type), this.declarationErrors = /* @__PURE__ */ new Map();
|
|
238691
238691
|
}
|
|
238692
|
-
recordDeclarationError(ParsingErrorClass,
|
|
238693
|
-
const index =
|
|
238694
|
-
this.declarationErrors.set(index, [ParsingErrorClass,
|
|
238692
|
+
recordDeclarationError(ParsingErrorClass, at) {
|
|
238693
|
+
const index = at.index;
|
|
238694
|
+
this.declarationErrors.set(index, [ParsingErrorClass, at]);
|
|
238695
238695
|
}
|
|
238696
238696
|
clearDeclarationError(index) {
|
|
238697
238697
|
this.declarationErrors.delete(index);
|
|
@@ -238727,10 +238727,10 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
|
238727
238727
|
scope.recordDeclarationError(error, origin);
|
|
238728
238728
|
}
|
|
238729
238729
|
}
|
|
238730
|
-
recordAsyncArrowParametersError(
|
|
238730
|
+
recordAsyncArrowParametersError(at) {
|
|
238731
238731
|
const { stack } = this;
|
|
238732
238732
|
let i = stack.length - 1, scope = stack[i];
|
|
238733
|
-
for (; scope.canBeArrowParameterDeclaration(); ) 2 === scope.type && scope.recordDeclarationError(Errors.AwaitBindingIdentifier,
|
|
238733
|
+
for (; scope.canBeArrowParameterDeclaration(); ) 2 === scope.type && scope.recordDeclarationError(Errors.AwaitBindingIdentifier, at), scope = stack[--i];
|
|
238734
238734
|
}
|
|
238735
238735
|
validateAsPattern() {
|
|
238736
238736
|
const { stack } = this, currentScope = stack[stack.length - 1];
|
|
@@ -239219,8 +239219,8 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
|
239219
239219
|
if (Array.isArray(val)) for (const child of val) child && this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
|
|
239220
239220
|
else val && this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
|
|
239221
239221
|
}
|
|
239222
|
-
checkIdentifier(
|
|
239223
|
-
this.state.strict && (strictModeChanged ? isStrictBindReservedWord(
|
|
239222
|
+
checkIdentifier(at, bindingType, strictModeChanged = false) {
|
|
239223
|
+
this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name)) && (64 === bindingType ? this.raise(Errors.StrictEvalArguments, at, { referenceName: at.name }) : this.raise(Errors.StrictEvalArgumentsBinding, at, { bindingName: at.name })), 8192 & bindingType && "let" === at.name && this.raise(Errors.LetInLexicalBinding, at), 64 & bindingType || this.declareNameFromIdentifier(at, bindingType);
|
|
239224
239224
|
}
|
|
239225
239225
|
declareNameFromIdentifier(identifier, binding) {
|
|
239226
239226
|
this.scope.declareName(identifier.name, binding, identifier.loc.start);
|
|
@@ -242945,7 +242945,7 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
|
242945
242945
|
}
|
|
242946
242946
|
parseProgram(program, end = 140, sourceType = this.options.sourceType) {
|
|
242947
242947
|
if (program.sourceType = sourceType, program.interpreter = this.parseInterpreterDirective(), this.parseBlockBody(program, true, true, end), this.inModule) {
|
|
242948
|
-
if (!this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) for (const [localName,
|
|
242948
|
+
if (!this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) for (const [localName, at] of Array.from(this.scope.undefinedExports)) this.raise(Errors.ModuleExportUndefined, at, { localName });
|
|
242949
242949
|
this.addExtra(program, "topLevelAwait", this.state.hasTopLevelAwait);
|
|
242950
242950
|
}
|
|
242951
242951
|
let finishedProgram;
|
|
@@ -256737,24 +256737,17 @@ var headerMinLength = (parsed, _when = void 0, value2 = 0) => {
|
|
|
256737
256737
|
// node_modules/@commitlint/rules/lib/header-trim.js
|
|
256738
256738
|
var headerTrim = (parsed) => {
|
|
256739
256739
|
const { header } = parsed;
|
|
256740
|
-
if (!header)
|
|
256740
|
+
if (!header)
|
|
256741
256741
|
return [true];
|
|
256742
|
-
|
|
256743
|
-
const
|
|
256744
|
-
|
|
256745
|
-
|
|
256746
|
-
|
|
256747
|
-
|
|
256748
|
-
|
|
256749
|
-
|
|
256750
|
-
|
|
256751
|
-
case startsWithWhiteSpace:
|
|
256752
|
-
return [false, message(["header", "must not start with whitespace"])];
|
|
256753
|
-
case endsWithWhiteSpace:
|
|
256754
|
-
return [false, message(["header", "must not end with whitespace"])];
|
|
256755
|
-
default:
|
|
256756
|
-
return [true];
|
|
256757
|
-
}
|
|
256742
|
+
const startsWithWhiteSpace = header.length > header.trimStart().length;
|
|
256743
|
+
const endsWithWhiteSpace = header.length > header.trimEnd().length;
|
|
256744
|
+
if (startsWithWhiteSpace && endsWithWhiteSpace)
|
|
256745
|
+
return [false, message(["header", "must not be surrounded by whitespace"])];
|
|
256746
|
+
if (startsWithWhiteSpace)
|
|
256747
|
+
return [false, message(["header", "must not start with whitespace"])];
|
|
256748
|
+
if (endsWithWhiteSpace)
|
|
256749
|
+
return [false, message(["header", "must not end with whitespace"])];
|
|
256750
|
+
return [true];
|
|
256758
256751
|
};
|
|
256759
256752
|
|
|
256760
256753
|
// node_modules/@commitlint/rules/lib/references-empty.js
|
|
@@ -259715,9 +259708,8 @@ var Queue = class {
|
|
|
259715
259708
|
}
|
|
259716
259709
|
}
|
|
259717
259710
|
*drain() {
|
|
259718
|
-
|
|
259719
|
-
|
|
259720
|
-
yield current;
|
|
259711
|
+
while (this.#head) {
|
|
259712
|
+
yield this.dequeue();
|
|
259721
259713
|
}
|
|
259722
259714
|
}
|
|
259723
259715
|
};
|
|
@@ -260017,7 +260009,7 @@ var X = l((ke, B) => {
|
|
|
260017
260009
|
return t.isFile() && Kt(t, e);
|
|
260018
260010
|
}
|
|
260019
260011
|
function Kt(t, e) {
|
|
260020
|
-
var n = t.mode, r = t.uid, s = t.gid, o = e.uid !== void 0 ? e.uid : process.getuid && process.getuid(), i = e.gid !== void 0 ? e.gid : process.getgid && process.getgid(),
|
|
260012
|
+
var n = t.mode, r = t.uid, s = t.gid, o = e.uid !== void 0 ? e.uid : process.getuid && process.getuid(), i = e.gid !== void 0 ? e.gid : process.getgid && process.getgid(), a = parseInt("100", 8), c = parseInt("010", 8), u = parseInt("001", 8), f = a | c, p = n & u || n & c && s === i || n & a && r === o || n & f && o === 0;
|
|
260021
260013
|
return p;
|
|
260022
260014
|
}
|
|
260023
260015
|
});
|
|
@@ -260067,30 +260059,30 @@ var et = l((Re, tt) => {
|
|
|
260067
260059
|
};
|
|
260068
260060
|
}, Z = (t, e, n) => {
|
|
260069
260061
|
typeof e == "function" && (n = e, e = {}), e || (e = {});
|
|
260070
|
-
let { pathEnv: r, pathExt: s, pathExtExe: o } = Q(t, e), i = [],
|
|
260071
|
-
if (
|
|
260062
|
+
let { pathEnv: r, pathExt: s, pathExtExe: o } = Q(t, e), i = [], a = (u) => new Promise((f, p) => {
|
|
260063
|
+
if (u === r.length)
|
|
260072
260064
|
return e.all && i.length ? f(i) : p(J(t));
|
|
260073
|
-
let d = r[
|
|
260074
|
-
f(c(b,
|
|
260075
|
-
}), c = (
|
|
260065
|
+
let d = r[u], w = /^".*"$/.test(d) ? d.slice(1, -1) : d, m = Y.join(w, t), b = !w && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + m : m;
|
|
260066
|
+
f(c(b, u, 0));
|
|
260067
|
+
}), c = (u, f, p) => new Promise((d, w) => {
|
|
260076
260068
|
if (p === s.length)
|
|
260077
|
-
return d(
|
|
260069
|
+
return d(a(f + 1));
|
|
260078
260070
|
let m = s[p];
|
|
260079
|
-
V(
|
|
260071
|
+
V(u + m, { pathExt: o }, (b, Ot) => {
|
|
260080
260072
|
if (!b && Ot)
|
|
260081
260073
|
if (e.all)
|
|
260082
|
-
i.push(
|
|
260074
|
+
i.push(u + m);
|
|
260083
260075
|
else
|
|
260084
|
-
return d(
|
|
260085
|
-
return d(c(
|
|
260076
|
+
return d(u + m);
|
|
260077
|
+
return d(c(u, f, p + 1));
|
|
260086
260078
|
});
|
|
260087
260079
|
});
|
|
260088
|
-
return n ?
|
|
260080
|
+
return n ? a(0).then((u) => n(null, u), n) : a(0);
|
|
260089
260081
|
}, Xt = (t, e) => {
|
|
260090
260082
|
e = e || {};
|
|
260091
260083
|
let { pathEnv: n, pathExt: r, pathExtExe: s } = Q(t, e), o = [];
|
|
260092
260084
|
for (let i = 0; i < n.length; i++) {
|
|
260093
|
-
let
|
|
260085
|
+
let a = n[i], c = /^".*"$/.test(a) ? a.slice(1, -1) : a, u = Y.join(c, t), f = !c && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + u : u;
|
|
260094
260086
|
for (let p = 0; p < r.length; p++) {
|
|
260095
260087
|
let d = f + r[p];
|
|
260096
260088
|
try {
|
|
@@ -260148,21 +260140,21 @@ var ct = l((Ne, it) => {
|
|
|
260148
260140
|
}
|
|
260149
260141
|
it.exports = Yt;
|
|
260150
260142
|
});
|
|
260151
|
-
var
|
|
260143
|
+
var ut = l((qe, P) => {
|
|
260152
260144
|
"use strict";
|
|
260153
|
-
var
|
|
260145
|
+
var C = /([()\][%!^"`<>&|;, *?])/g;
|
|
260154
260146
|
function Vt(t) {
|
|
260155
|
-
return t = t.replace(
|
|
260147
|
+
return t = t.replace(C, "^$1"), t;
|
|
260156
260148
|
}
|
|
260157
260149
|
function Jt(t, e) {
|
|
260158
|
-
return t = `${t}`, t = t.replace(/(\\*)"/g, '$1$1\\"'), t = t.replace(/(\\*)$/, "$1$1"), t = `"${t}"`, t = t.replace(
|
|
260150
|
+
return t = `${t}`, t = t.replace(/(\\*)"/g, '$1$1\\"'), t = t.replace(/(\\*)$/, "$1$1"), t = `"${t}"`, t = t.replace(C, "^$1"), e && (t = t.replace(C, "^$1")), t;
|
|
260159
260151
|
}
|
|
260160
|
-
|
|
260161
|
-
|
|
260152
|
+
P.exports.command = Vt;
|
|
260153
|
+
P.exports.argument = Jt;
|
|
260162
260154
|
});
|
|
260163
|
-
var lt = l((Ie,
|
|
260155
|
+
var lt = l((Ie, at) => {
|
|
260164
260156
|
"use strict";
|
|
260165
|
-
|
|
260157
|
+
at.exports = /^#!(.*)/;
|
|
260166
260158
|
});
|
|
260167
260159
|
var dt = l((Le, pt) => {
|
|
260168
260160
|
"use strict";
|
|
@@ -260190,7 +260182,7 @@ var ht = l((je, ft) => {
|
|
|
260190
260182
|
});
|
|
260191
260183
|
var wt = l((Fe, Et) => {
|
|
260192
260184
|
"use strict";
|
|
260193
|
-
var ee = h("path"), mt = ct(), gt =
|
|
260185
|
+
var ee = h("path"), mt = ct(), gt = ut(), ne = ht(), re = process.platform === "win32", se = /\.(?:com|exe)$/i, oe = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
260194
260186
|
function ie(t) {
|
|
260195
260187
|
t.file = mt(t);
|
|
260196
260188
|
let e = t.file && ne(t.file);
|
|
@@ -260208,7 +260200,7 @@ var wt = l((Fe, Et) => {
|
|
|
260208
260200
|
}
|
|
260209
260201
|
return t;
|
|
260210
260202
|
}
|
|
260211
|
-
function
|
|
260203
|
+
function ue(t, e, n) {
|
|
260212
260204
|
e && !Array.isArray(e) && (n = e, e = null), e = e ? e.slice(0) : [], n = Object.assign({}, n);
|
|
260213
260205
|
let r = {
|
|
260214
260206
|
command: t,
|
|
@@ -260222,7 +260214,7 @@ var wt = l((Fe, Et) => {
|
|
|
260222
260214
|
};
|
|
260223
260215
|
return n.shell ? r : ce(r);
|
|
260224
260216
|
}
|
|
260225
|
-
Et.exports =
|
|
260217
|
+
Et.exports = ue;
|
|
260226
260218
|
});
|
|
260227
260219
|
var bt = l((ze, vt) => {
|
|
260228
260220
|
"use strict";
|
|
@@ -260236,7 +260228,7 @@ var bt = l((ze, vt) => {
|
|
|
260236
260228
|
spawnargs: t.args
|
|
260237
260229
|
});
|
|
260238
260230
|
}
|
|
260239
|
-
function
|
|
260231
|
+
function ae(t, e) {
|
|
260240
260232
|
if (!S)
|
|
260241
260233
|
return;
|
|
260242
260234
|
let n = t.emit;
|
|
@@ -260256,13 +260248,13 @@ var bt = l((ze, vt) => {
|
|
|
260256
260248
|
return S && t === 1 && !e.file ? k(e.original, "spawnSync") : null;
|
|
260257
260249
|
}
|
|
260258
260250
|
vt.exports = {
|
|
260259
|
-
hookChildProcess:
|
|
260251
|
+
hookChildProcess: ae,
|
|
260260
260252
|
verifyENOENT: xt,
|
|
260261
260253
|
verifyENOENTSync: le,
|
|
260262
260254
|
notFoundError: k
|
|
260263
260255
|
};
|
|
260264
260256
|
});
|
|
260265
|
-
var
|
|
260257
|
+
var Ct = l((He, E) => {
|
|
260266
260258
|
"use strict";
|
|
260267
260259
|
var yt = h("child_process"), T = wt(), A = bt();
|
|
260268
260260
|
function _t(t, e, n) {
|
|
@@ -260312,7 +260304,7 @@ var L = (t) => {
|
|
|
260312
260304
|
s.pipe(n, { end: false }), s.on("end", r);
|
|
260313
260305
|
return n;
|
|
260314
260306
|
};
|
|
260315
|
-
var
|
|
260307
|
+
var Pt = Nt(Ct(), 1);
|
|
260316
260308
|
var x = class extends Error {
|
|
260317
260309
|
result;
|
|
260318
260310
|
output;
|
|
@@ -260414,17 +260406,18 @@ var R = class {
|
|
|
260414
260406
|
if (!e)
|
|
260415
260407
|
throw new Error("No process was started");
|
|
260416
260408
|
let n = "", r = "";
|
|
260417
|
-
if (this._streamErr)
|
|
260418
|
-
for await (let o of this._streamErr)
|
|
260419
|
-
n += o.toString();
|
|
260420
260409
|
if (this._streamOut)
|
|
260421
260410
|
for await (let o of this._streamOut)
|
|
260422
260411
|
r += o.toString();
|
|
260412
|
+
if (this._streamErr)
|
|
260413
|
+
for await (let o of this._streamErr)
|
|
260414
|
+
n += o.toString();
|
|
260423
260415
|
if (await this._processClosed, this._options?.stdin && await this._options.stdin, e.removeAllListeners(), this._thrownError)
|
|
260424
260416
|
throw this._thrownError;
|
|
260425
260417
|
let s = {
|
|
260426
260418
|
stderr: n,
|
|
260427
|
-
stdout: r
|
|
260419
|
+
stdout: r,
|
|
260420
|
+
exitCode: this.exitCode
|
|
260428
260421
|
};
|
|
260429
260422
|
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0)
|
|
260430
260423
|
throw new x(this, s);
|
|
@@ -260441,14 +260434,14 @@ var R = class {
|
|
|
260441
260434
|
...n.nodeOptions
|
|
260442
260435
|
}, s = [];
|
|
260443
260436
|
this._resetState(), n.timeout !== void 0 && s.push(AbortSignal.timeout(n.timeout)), n.signal !== void 0 && s.push(n.signal), n.persist === true && (r.detached = true), s.length > 0 && (r.signal = xe(s)), r.env = I(e, r.env);
|
|
260444
|
-
let { command: o, args: i } = we(this._command, this._args),
|
|
260445
|
-
|
|
260446
|
-
|
|
260447
|
-
|
|
260437
|
+
let { command: o, args: i } = we(this._command, this._args), a = (0, Pt._parse)(o, i, r), c = de(
|
|
260438
|
+
a.command,
|
|
260439
|
+
a.args,
|
|
260440
|
+
a.options
|
|
260448
260441
|
);
|
|
260449
260442
|
if (c.stderr && (this._streamErr = c.stderr), c.stdout && (this._streamOut = c.stdout), this._process = c, c.once("error", this._onError), c.once("close", this._onClose), n.stdin !== void 0 && c.stdin && n.stdin.process) {
|
|
260450
|
-
let { stdout:
|
|
260451
|
-
|
|
260443
|
+
let { stdout: u } = n.stdin.process;
|
|
260444
|
+
u && u.pipe(c.stdin);
|
|
260452
260445
|
}
|
|
260453
260446
|
}
|
|
260454
260447
|
_resetState() {
|
|
@@ -265716,8 +265709,6 @@ typescript/lib/typescript.js:
|
|
|
265716
265709
|
***************************************************************************** *)
|
|
265717
265710
|
|
|
265718
265711
|
cosmiconfig/dist/loaders.js:
|
|
265719
|
-
(* istanbul ignore next -- @preserve *)
|
|
265720
|
-
|
|
265721
265712
|
cosmiconfig/dist/util.js:
|
|
265722
265713
|
(* istanbul ignore next -- @preserve *)
|
|
265723
265714
|
|
|
@@ -265726,32 +265717,12 @@ cosmiconfig/dist/ExplorerBase.js:
|
|
|
265726
265717
|
(* istanbul ignore next -- @preserve *)
|
|
265727
265718
|
|
|
265728
265719
|
cosmiconfig/dist/Explorer.js:
|
|
265729
|
-
(* istanbul ignore if -- @preserve *)
|
|
265730
|
-
|
|
265731
265720
|
cosmiconfig/dist/ExplorerSync.js:
|
|
265732
265721
|
(* istanbul ignore if -- @preserve *)
|
|
265733
265722
|
|
|
265734
265723
|
yargs-parser/build/lib/string-utils.js:
|
|
265735
|
-
(**
|
|
265736
|
-
* @license
|
|
265737
|
-
* Copyright (c) 2016, Contributors
|
|
265738
|
-
* SPDX-License-Identifier: ISC
|
|
265739
|
-
*)
|
|
265740
|
-
|
|
265741
265724
|
yargs-parser/build/lib/tokenize-arg-string.js:
|
|
265742
|
-
(**
|
|
265743
|
-
* @license
|
|
265744
|
-
* Copyright (c) 2016, Contributors
|
|
265745
|
-
* SPDX-License-Identifier: ISC
|
|
265746
|
-
*)
|
|
265747
|
-
|
|
265748
265725
|
yargs-parser/build/lib/yargs-parser-types.js:
|
|
265749
|
-
(**
|
|
265750
|
-
* @license
|
|
265751
|
-
* Copyright (c) 2016, Contributors
|
|
265752
|
-
* SPDX-License-Identifier: ISC
|
|
265753
|
-
*)
|
|
265754
|
-
|
|
265755
265726
|
yargs-parser/build/lib/yargs-parser.js:
|
|
265756
265727
|
(**
|
|
265757
265728
|
* @license
|
package/lint-staged.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const eslint = ["js", "cjs", "mjs", "cts", "mts", "vue", "ts"];
|
|
2
|
+
const eslintPatterns = eslint.map((it) => `*.${it}`);
|
|
3
|
+
const eslintGlob = `(${eslintPatterns.join("|")})`;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @type {import('lint-staged').Configuration}
|
|
7
|
+
*/
|
|
8
|
+
const config = {
|
|
9
|
+
[eslintGlob]: ["prettier --write", "eslint --fix"],
|
|
10
|
+
[`!${eslintGlob}`]: ["prettier --ignore-unknown --write"],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
if (process.argv[1] === import.meta.filename) {
|
|
14
|
+
console.log(config);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/commitlint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "FK commitlint shareable config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"commitlint"
|
|
@@ -17,17 +17,20 @@
|
|
|
17
17
|
"exports": {
|
|
18
18
|
".": "./dist/config/default.js",
|
|
19
19
|
"./default": "./dist/config/default.js",
|
|
20
|
-
"./no-jira": "./dist/config/no-jira.js"
|
|
20
|
+
"./no-jira": "./dist/config/no-jira.js",
|
|
21
|
+
"./lint-staged": "./lint-staged.js"
|
|
21
22
|
},
|
|
22
23
|
"main": "dist/config/default.js",
|
|
23
24
|
"bin": {
|
|
24
25
|
"commitlint": "bin/commitlint.js",
|
|
25
|
-
"commitlint-config": "bin/install.js"
|
|
26
|
+
"commitlint-config": "bin/install.js",
|
|
27
|
+
"lint-staged": "bin/lint-staged.js"
|
|
26
28
|
},
|
|
27
29
|
"files": [
|
|
28
30
|
"bin",
|
|
29
31
|
"dist",
|
|
30
|
-
"gitmessage"
|
|
32
|
+
"gitmessage",
|
|
33
|
+
"lint-staged.js"
|
|
31
34
|
],
|
|
32
35
|
"scripts": {
|
|
33
36
|
"prebuild": "rimraf dist",
|
|
@@ -53,6 +56,6 @@
|
|
|
53
56
|
"ts-node": "^10"
|
|
54
57
|
},
|
|
55
58
|
"engines": {
|
|
56
|
-
"node": ">= 18"
|
|
59
|
+
"node": ">= 20.18"
|
|
57
60
|
}
|
|
58
61
|
}
|