Currently, this repo has some basic configuration for Prettier, but it doesn't seem to be working. Prettier is currently only enabled as a husky pre-commit hook, but it only lints Markdown, YAML, JSON, and CSS files, and it clearly doesn't work too often, considering how many Markdown files are not formatted properly.
This PR:
Runs prettier on every file as a husky pre-commit hook
I had to set the --concurrent false option on lint-staged, to avoid race conditions with ESLint.
Disable the object-curly-spacing ESLint rule, since it conflicts with prettier.
Disable the comma-dangle ESLint rule, since it conflicts with prettier v2 (won't be needed once we merge #151).
Adds prettier to the npm run lint script, so that we check for formatting issues in CI.
Autoformats every file that was failing with npx prettier --write .
Notes to reviewer
I'd recommend reviewing this PR commit-by-commit, since the style: run `npx prettier . --write` commit has a lot of changes, but it's all auto-generated.
Currently, this repo has some basic configuration for Prettier, but it doesn't seem to be working. Prettier is currently only enabled as a husky pre-commit hook, but it only lints Markdown, YAML, JSON, and CSS files, and it clearly doesn't work too often, considering how many Markdown files are not formatted properly.
This PR:
prettier
on every file as a husky pre-commit hook--concurrent false
option onlint-staged
, to avoid race conditions with ESLint.object-curly-spacing
ESLint rule, since it conflicts with prettier.comma-dangle
ESLint rule, since it conflicts with prettier v2 (won't be needed once we merge #151).prettier
to thenpm run lint
script, so that we check for formatting issues in CI.npx prettier --write .
Notes to reviewer
I'd recommend reviewing this PR commit-by-commit, since the
style: run `npx prettier . --write`
commit has a lot of changes, but it's all auto-generated.