forked from mdn/content
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.lintstagedrc.js
23 lines (23 loc) · 881 Bytes
/
.lintstagedrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export default {
"files/en-us/_redirects.txt": (filenames) => [
`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`],
".vscode/dictionaries/*.txt": (filenames) => [
`node scripts/sort_and_unique_file_lines.js ${filenames.join(" ")}`,
],
};