ci(pre-commit): Pre-commit hook now should no longer block commits

Added eslint-plugin-only-warn to suppress errors

Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
This commit is contained in:
2025-04-15 11:15:41 +02:00
parent e5a3e04e0c
commit a72a2c3358
3 changed files with 17 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
import onlyWarn from "eslint-plugin-only-warn";
/** @type {import('eslint').Linter.Config[]} */
export default [
@@ -11,4 +12,9 @@ export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
plugins: {
onlyWarn,
},
},
];

View File

@@ -32,6 +32,7 @@
"@types/node": "^22.13.10",
"eslint": "^9.22.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-only-warn": "^1.1.0",
"finepack": "^2.12.7",
"globals": "^16.0.0",
"husky": "^9.1.7",
@@ -65,7 +66,7 @@
},
"lint-staged": {
"package.json": "finepack",
"*.{js,ts,jsx,tsx}": "cmd /c eslint --cache --fix . || exit 0",
"*.{js,ts,jsx,tsx}": "eslint --cache --fix .",
"*.{js,ts,jsx,tsx,json,css,md}": "prettier --write"
},
"type": "module"

9
pnpm-lock.yaml generated
View File

@@ -27,6 +27,9 @@ importers:
eslint-config-prettier:
specifier: ^10.1.1
version: 10.1.1(eslint@9.22.0)
eslint-plugin-only-warn:
specifier: ^1.1.0
version: 1.1.0
finepack:
specifier: ^2.12.7
version: 2.12.7
@@ -413,6 +416,10 @@ packages:
peerDependencies:
eslint: '>=7.0.0'
eslint-plugin-only-warn@1.1.0:
resolution: {integrity: sha512-2tktqUAT+Q3hCAU0iSf4xAN1k9zOpjK5WO8104mB0rT/dGhOa09582HN5HlbxNbPRZ0THV7nLGvzugcNOSjzfA==}
engines: {node: '>=6'}
eslint-scope@8.3.0:
resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -1532,6 +1539,8 @@ snapshots:
dependencies:
eslint: 9.22.0
eslint-plugin-only-warn@1.1.0: {}
eslint-scope@8.3.0:
dependencies:
esrecurse: 4.3.0