@forsakringskassan/commitlint-config 3.0.1 → 3.0.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/install.js CHANGED
@@ -856,6 +856,9 @@ if (process.env.FK_COMMITLINT_SKIP !== "1") {
856
856
  process.exit(1);
857
857
  }
858
858
  if (!import_is_ci.default) {
859
+ await spawn2("git", ["config", "--unset", "core.hooksPath"], {
860
+ cwd: process.env["INIT_CWD"]
861
+ });
859
862
  const result = await spawn2(
860
863
  "npm",
861
864
  [
@@ -867,6 +870,10 @@ if (process.env.FK_COMMITLINT_SKIP !== "1") {
867
870
  ],
868
871
  { cwd: process.env["INIT_CWD"] }
869
872
  );
873
+ if (result.output.toLowerCase().includes("error")) {
874
+ console.log(result.output);
875
+ process.exit(1);
876
+ }
870
877
  console.log(result.output);
871
878
  }
872
879
  }
package/hooks.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
 
3
- const lintConfigPath = fileURLToPath.meta.resolve("./lint-staged.js");
3
+ const lintConfigPath = fileURLToPath(import.meta.resolve("./lint-staged.js"));
4
4
 
5
5
  export default {
6
6
  "pre-commit": `npm exec lint-staged -- --config "${lintConfigPath}" "$@"`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/commitlint-config",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "FK commitlint shareable config",
5
5
  "keywords": [
6
6
  "commitlint"