From be117bca86f21220a28770b327a86c56a0a1e653 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Wed, 3 Jul 2024 10:54:13 +0200 Subject: [PATCH] Tools: Run packageJsonLint hook only when JSON files are being committed --- lint-staged.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lint-staged.config.js b/lint-staged.config.js index 799e354dd..f2288d680 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -21,8 +21,8 @@ module.exports = { // See https://github.com/lint-staged/lint-staged/issues/934#issuecomment-743299357 '*.{js,jsx,ts,tsx,task1}': 'yarn checkIgnoredFiles', '*.{js,jsx,ts,tsx,task2}': 'yarn spellcheck', - '*.{js,jsx,ts,tsx,task3}': 'yarn packageJsonLint', - '*.{js,jsx,ts,tsx,task4}': 'yarn linter-precommit', + '*.{js,jsx,ts,tsx,task3}': 'yarn linter-precommit', + '*.{json,task4}': 'yarn packageJsonLint', '*.{md,mdx,task5}': 'yarn spellcheck', '*.{md,mdx,task6}': 'yarn validateFilenames', };