Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting #1211

Closed
wants to merge 11 commits into from
Closed

Formatting #1211

wants to merge 11 commits into from

Conversation

goosewobbler
Copy link
Contributor

Using prettier, lint-staged and husky to remove formatting nits from all PRs going forward. This does not include linting, saving that for another PR.

Prettier options: https://prettier.io/docs/en/options.html

Changes

  • lint-staged runs on husky pre-commit, which runs the format script, which runs prettier on TS, JS, MD, YML, JSON files.
  • formatting can be run and checked manually with npm run format and npm run format:check
  • unit tests run on husky pre-push - so no more PRs with broken tests, and zero tolerance for flaky tests

Prettier settings

See .prettierrc.json

In-editor formatting

Prettier VSCode formatter - not required for development but I usually have this configured to format on save:
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

TODO:

  • update package-lock.json
  • make hook files executable
  • ensure hooks work
  • deflake tests - if necessary: 2166fd6 (#913)

@goosewobbler goosewobbler mentioned this pull request Dec 1, 2022
4 tasks
@goosewobbler
Copy link
Contributor Author

Closed in favour of #1212 and #1213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant