Skip to content

Commit

Permalink
Update .lintstagedrc configuration for new repo structure
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
oleiade committed Nov 14, 2023
1 parent be98a2b commit 377ad1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"docs/sources/**/*.md": [
"prettier --parser markdown --write",
"eslint -c ./docs/sources/.eslintrc.js --fix"
],
"*.{js,jsx,css,scss}": "prettier --write",
"*.{js,jsx}": "eslint --fix",
"*.{md,mdx}": "eslint -c ./src/data/markdown/.eslintrc.js --fix"
"src/data/markdown/**/*.{md,mdx}": "eslint -c ./src/data/markdown/.eslintrc.js --fix"
}

0 comments on commit 377ad1d

Please sign in to comment.