From 366f935a6e736f13124663aae66b020c350dd442 Mon Sep 17 00:00:00 2001 From: OnkarRuikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Wed, 8 May 2024 10:36:26 +0530 Subject: [PATCH 1/2] feat(husky): run fix-redircts command in precommit --- .lintstagedrc.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .lintstagedrc.js diff --git a/.lintstagedrc.js b/.lintstagedrc.js new file mode 100644 index 000000000000000..917f86752a5bff9 --- /dev/null +++ b/.lintstagedrc.js @@ -0,0 +1,3 @@ +export default { + "files/en-us/_redirects.txt": (filenames) => `yarn content fix-redirects en-US`, +} From 89fdaa1ab8403d9ab0830a3be4a07c7fb8ea533b Mon Sep 17 00:00:00 2001 From: OnkarRuikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Wed, 8 May 2024 10:49:52 +0530 Subject: [PATCH 2/2] do validation as well --- .lintstagedrc.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.lintstagedrc.js b/.lintstagedrc.js index 917f86752a5bff9..d6af9e30a33b931 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -1,3 +1,6 @@ export default { - "files/en-us/_redirects.txt": (filenames) => `yarn content fix-redirects en-US`, -} + "files/en-us/_redirects.txt": (filenames) => [ + `yarn content fix-redirects en-US`, + `yarn content validate-redirects en-us --strict`, + ], +};