From 708ed1435e715f47b676d3b5975b73a581547299 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:25:10 +0100 Subject: [PATCH] refactor: don't use JS if it's a simple key/value topic (#609) --- .config/.lintstagedrc-prettier.js | 3 --- .config/.lintstagedrc-prettier.json | 1 + .lintstagedrc => .config/.lintstagedrc.json | 0 .husky/pre-commit | 4 ++-- 4 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 .config/.lintstagedrc-prettier.js create mode 100644 .config/.lintstagedrc-prettier.json rename .lintstagedrc => .config/.lintstagedrc.json (100%) diff --git a/.config/.lintstagedrc-prettier.js b/.config/.lintstagedrc-prettier.js deleted file mode 100644 index 655bfb578..000000000 --- a/.config/.lintstagedrc-prettier.js +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '**/*': 'prettier --write --ignore-unknown' -}; diff --git a/.config/.lintstagedrc-prettier.json b/.config/.lintstagedrc-prettier.json new file mode 100644 index 000000000..23bbc4320 --- /dev/null +++ b/.config/.lintstagedrc-prettier.json @@ -0,0 +1 @@ +{ "**/*": "prettier --write --ignore-unknown" } diff --git a/.lintstagedrc b/.config/.lintstagedrc.json similarity index 100% rename from .lintstagedrc rename to .config/.lintstagedrc.json diff --git a/.husky/pre-commit b/.husky/pre-commit index 9c7d2a32e..dfb5910db 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,9 +1,9 @@ echo "### validate branch name ###" validate-branch-name echo "### lint staged files ###" -lint-staged +lint-staged --config .config/.lintstagedrc.json echo "### prettify staged files ###" -lint-staged --config .config/.lintstagedrc-prettier.js +lint-staged --config .config/.lintstagedrc-prettier.json git update-index --again echo "### check for commit mail ###" node ./scripts/check-commit-mail.mjs