frame
frame copied to clipboard
Formatting
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
andnpm 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
printWidth: 120 (better display on larger monitors) singleQuote: true (single quotes used for all string literals apart from JSX) jsxSingleQuote: true (single quotes used for all JSX string literals) semi: false (no semicolons)
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
one more thing is we should wait until we rebase develop
off of 0.5
before we do this otherwise the rebase will be an absolute nightmare. which direction makes more sense, to do this on 0.5
and port it to develop
or vice versa?
I think we might actually want to wait until the first develop/canary release goes to production before making these types of changes. Also, please wait for my review on this one as well.
Closing in favour of #1113