Skip to content

Conversation

@DonJayamanne
Copy link

For #10837

@DonJayamanne DonJayamanne changed the title Update prettier Update prettier to latest version Mar 27, 2020
singleQuote: true,
printWidth: 120,
tabWidth: 4,
trailingComma: 'none',
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retaining backwards compatibility (inline with our tslint config as well).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the new default?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the docs, the default is "es5" - Trailing commas where valid in ES5 (objects, arrays, etc.). The third option is 'all', which sounds like it requires extra effort (not worth it).

So why not use the default ("es5") here? FWIW, I've found trailing commas to be convenient and that having them causes less churn when adding or removing entries.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, @ericsnowcurrently Will do that separately, I didn't want to change the existing style from no trailing comma to trailing comma.
Will do that, had to merge


performanceJson.forEach(result => {
const cleanTimes = result.times.filter(x => x !== -1);
performanceJson.forEach((result) => {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default setting in prettier is to add (), i've left that as is.

Copy link

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the open question on trailingComma, LGTM.

@DonJayamanne DonJayamanne merged commit 61b179b into microsoft:master Mar 31, 2020
@DonJayamanne DonJayamanne deleted the updatePrettier branch March 31, 2020 00:10
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.3% 0.3% Duplication

@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants