-
Notifications
You must be signed in to change notification settings - Fork 843
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 all TypeScript files with Prettier through TSLint #1529
Conversation
Think we should set jsxSingleQuote to false, better matches our existing pattern and, from I've seen, everyone |
Tweaked the config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Yay for linting. Only one that seemed a little off was not breaking props up per line. Looks like this may only happen when it's closed? I really don't care to argue about it though, so if @chandlerprall is good, I'm good with it and things will automatically get changed on save for me :) |
Those lines will break when they’re over 80 columns. It how the formatting algorithm works. |
…1538) Now that we've merged #1529, all TypeScript files will trigger lint warnings if their formatting needs updating with Prettier (which can be done by fixing with the linter). So far, so good. However, the Webpack config for `src-docs` pulls in the project's TypesScript and TSLint settings, meaning that Webpack won't compile any TS files that have lint problems. We don't need checking at this stage to be so strict, because the pre-commit hook and general lint task already check everything. So, in order to stop docs development from being annoying, I've customised the TSLint settings when running `src-docs` so that lint problems are now warnings, instead of errors. They'll still have to get fixed before committing.
Summary
I had a spare 20 minutes, so I added Prettier into the TSLint config and formatted all the TypeScript files. As we migrate more files to TS, they'll get formatted too.
Checklist