npm-pkg-lint 5.3.1 → 5.3.2
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/dist/index.js +12 -9
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2421,7 +2421,11 @@ var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
|
2421
2421
|
var __getProtoOf2 = Object.getPrototypeOf;
|
|
2422
2422
|
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
2423
2423
|
var __commonJS2 = (cb, mod) => function __require2() {
|
|
2424
|
-
|
|
2424
|
+
try {
|
|
2425
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
2426
|
+
} catch (e) {
|
|
2427
|
+
throw mod = 0, e;
|
|
2428
|
+
}
|
|
2425
2429
|
};
|
|
2426
2430
|
var __copyProps2 = (to2, from, except, desc) => {
|
|
2427
2431
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -2534,12 +2538,11 @@ function yellow(value) {
|
|
|
2534
2538
|
function red(value) {
|
|
2535
2539
|
return styleText("red", value);
|
|
2536
2540
|
}
|
|
2537
|
-
var Severity =
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
})(Severity || {});
|
|
2541
|
+
var Severity = {
|
|
2542
|
+
OFF: 0,
|
|
2543
|
+
WARN: 1,
|
|
2544
|
+
ERROR: 2
|
|
2545
|
+
};
|
|
2543
2546
|
function pluralize(word, count) {
|
|
2544
2547
|
return count === 1 ? word : `${word}s`;
|
|
2545
2548
|
}
|
|
@@ -2547,7 +2550,7 @@ function centerLineColumn(el) {
|
|
|
2547
2550
|
return el.replace(/(\d+)\s+(\d+)/u, (_m, p1, p2) => dim(`${p1}:${p2}`));
|
|
2548
2551
|
}
|
|
2549
2552
|
function stripAnsi(text) {
|
|
2550
|
-
return text.replaceAll(/\
|
|
2553
|
+
return text.replaceAll(/\u{001B}\[[\d;]*m/gu, "");
|
|
2551
2554
|
}
|
|
2552
2555
|
function stylish(results) {
|
|
2553
2556
|
let output = "\n";
|
|
@@ -2567,7 +2570,7 @@ function stylish(results) {
|
|
|
2567
2570
|
fixableWarningCount += result.fixableWarningCount;
|
|
2568
2571
|
const rows = messages.map((message) => {
|
|
2569
2572
|
let messageType;
|
|
2570
|
-
if (Boolean(message.fatal) || message.severity ===
|
|
2573
|
+
if (Boolean(message.fatal) || message.severity === Severity.ERROR) {
|
|
2571
2574
|
messageType = red("error");
|
|
2572
2575
|
summaryColor = red;
|
|
2573
2576
|
} else {
|