-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Format the code using prettier #165
Comments
An existing prettier alternative: https://github.com/vvakame/typescript-formatter |
Prettier supports TypeScript now: https://github.com/prettier/prettier/releases/tag/1.4.0 |
This task is basically blocked until prettier 1.6 is released (see prettier/prettier#2589) and the VS Code extension supports sharing prettier configuration via a config file (see prettier/prettier-vscode#124). |
|
Done 🎉 🎊 |
I'd like to open a discussion about the coding style we using in LoopBack Next and more specifically, about automatically formatting all our source code using Prettier.
Why Prettier: http://jlongster.com/A-Prettier-Formatter
1.0 announcement: http://jlongster.com/prettier-1.0
Issue tracking TypeScript support: TypeScript Support prettier/prettier#13
Yes, I do realise Prettier does not support TypeScript yet, so this GH issue won't be actionable for a while.What needs to be done:
Move prettier config from
.vscode/settings.json
to.prettierrc
, see https://github.com/strongloop/loopback-next/blob/06c787b01992c878b5aafb25a53c2cdbbeb5df42/.vscode/settings.json#L21-L25Add a build step to verify formatting, see Lint like CI integration prettier/prettier#150 (comment) for starter
Reformat all existing code using prettier (this may be a prerequisite for the previous step)
Remove (disable) coding-style-related rules in tslint config, keep only rules catching programming errors
Update developer docs - see Improve developer docs #1015
Update all
loopback4-*
repos to use prettier tooThe text was updated successfully, but these errors were encountered: