Format all TypeScript files with Prettier through TSLint#1529
Merged
Conversation
Contributor
|
Think we should set jsxSingleQuote to false, better matches our existing pattern and, from I've seen, everyone |
Contributor
Author
|
Tweaked the config |
Contributor
|
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 :) |
Contributor
Author
|
Those lines will break when they’re over 80 columns. It how the formatting algorithm works. |
6 tasks
This was referenced Feb 6, 2019
pugnascotia
added a commit
that referenced
this pull request
Feb 7, 2019
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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