network
network copied to clipboard
chore: Formatted with prettier
Summary
Format all the codes using Prettier and its refreshed config from prettier branch.
@teogeb, attached is the result of npm run eslint with indent enabled.
I've tweaked the branch so that it's the only outstanding rule we have to deal with.
(Note that in this PR the indent rule is on.)
Cheers!
Changes
- Auto-formatted all the files.
- Adjusted selected eslint rules to match Prettier's behaviour:
- Enabled
avoidEscapeon thequotesrule. - Changed
@stylistic/member-delimiter-styletosemifor singleline types and interfaces (semiis typescript's default, too).
- Enabled
Limitations and future improvements
- n/a
Checklist before requesting a review
- [x] Is this a breaking change? If it is, be clear in summary.
- [x] Read through code myself one more time.
- [x] Make sure any and all
TODOcomments left behind are meant to be left in. - [x] Has reasonable passing test coverage?
- [x] Updated changelog if applicable.
- [x] Updated documentation if applicable.
So I did a bit of a readthru & analysis of the prettier formatting.
- I went thru all the code in packages
utilsandtrackeless-network. - I excluded changes related to white space, trailing commas, and interface/type semicolon (those can easily be enforced with any tool)
- For the remaining changes, I categorized and tallied them into the three categories based on readability - Good: change improved readability - Neutral: change neither improved or worsened readability - Bad: change worsened readability
So for the scores: utils
Good 24 (23%)
Neutral 74 (70%)
Bad 7 (7%)
trackerless-network
Good 51 (19%)
Neutral 198 (74%)
Bad 19 (7%)