Skip to content

Commit 377ad1d

Browse files
committed
Update .lintstagedrc configuration for new repo structure
In this commit we add a rule to the lint-staged configuration file at the root of the repository to ensure that all the markdown files contained in the docs/sources folder are formatted using our prettier config. Although not absolutely necessary, we enforce prettier to use the markdown parser, and have it write the result directly to staged files.
1 parent be98a2b commit 377ad1d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.lintstagedrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2+
"docs/sources/**/*.md": [
3+
"prettier --parser markdown --write",
4+
"eslint -c ./docs/sources/.eslintrc.js --fix"
5+
],
26
"*.{js,jsx,css,scss}": "prettier --write",
37
"*.{js,jsx}": "eslint --fix",
4-
"*.{md,mdx}": "eslint -c ./src/data/markdown/.eslintrc.js --fix"
8+
"src/data/markdown/**/*.{md,mdx}": "eslint -c ./src/data/markdown/.eslintrc.js --fix"
59
}

0 commit comments

Comments
 (0)