pasika 0.7.5 → 0.7.6
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.
|
@@ -6308,7 +6308,7 @@ var huskyHookRule = {
|
|
|
6308
6308
|
schema: [],
|
|
6309
6309
|
type: "problem",
|
|
6310
6310
|
docs: {
|
|
6311
|
-
description: "Require a pre-commit hook that runs lint-staged, typecheck, coverage
|
|
6311
|
+
description: "Require a pre-commit hook that runs lint-staged, typecheck, coverage and suppression pruning with local staging, and the libyear drift check."
|
|
6312
6312
|
}
|
|
6313
6313
|
},
|
|
6314
6314
|
create(context) {
|
|
@@ -6358,6 +6358,14 @@ var huskyHookRule = {
|
|
|
6358
6358
|
const suppressionsPath = path48.join(context.cwd, "eslint-suppressions.json");
|
|
6359
6359
|
if (existsSync5(suppressionsPath)) {
|
|
6360
6360
|
requireNamedScript("lint:prune");
|
|
6361
|
+
const pruneIndex = content.indexOf("npm run lint:prune");
|
|
6362
|
+
const localAddIndex = content.indexOf("git add eslint-suppressions.json");
|
|
6363
|
+
if (localAddIndex <= pruneIndex) {
|
|
6364
|
+
context.report({
|
|
6365
|
+
node,
|
|
6366
|
+
message: ".husky/pre-commit must stage eslint-suppressions.json after pruning suppressions."
|
|
6367
|
+
});
|
|
6368
|
+
}
|
|
6361
6369
|
}
|
|
6362
6370
|
if (scripts?.value.type === "Object") {
|
|
6363
6371
|
const prepare = scripts.value.members.find((member) => memberName5(member) === "prepare");
|