diff --git a/.lintstagedrc.js b/.lintstagedrc.js index d6af9e30a33b931..4204b0b0beb4f16 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -3,4 +3,18 @@ export default { `yarn content fix-redirects en-US`, `yarn content validate-redirects en-us --strict`, ], + "!*.md": (filenames) => [ + `prettier --ignore-unknown --write ${filenames.join(" ")}`, + ], + "*.md": (filenames) => [ + `markdownlint-cli2 --fix ${filenames.join(" ")}`, + `node scripts/front-matter_linter.js --fix true ${filenames.join(" ")}`, + `node scripts/update-moved-file-links.js --check`, + `prettier --write ${filenames.join(" ")}`, + ], + "tests/**/*.*": (filenames) => [`yarn test:front-matter-linter`], + "*.{svg,png,jpeg,jpg,gif}": (filenames) => [ + `yarn filecheck ${filenames.join(" ")}`, + ], + "*": (filenames) => [`node scripts/log-url-issues.js`], }; diff --git a/.lintstagedrc.json b/.lintstagedrc.json deleted file mode 100644 index affa61f1dd480a6..000000000000000 --- a/.lintstagedrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "!*.md": "prettier --ignore-unknown --write", - "*.md": [ - "markdownlint-cli2 --fix", - "node scripts/front-matter_linter.js --fix true", - "node scripts/update-moved-file-links.js --check", - "prettier --write" - ], - "tests/**/*.*": "yarn test:front-matter-linter", - "*.{svg,png,jpeg,jpg,gif}": "yarn filecheck", - "*": "node scripts/log-url-issues.js" -}