Skip to content

Conversation

@toger5
Copy link
Contributor

@toger5 toger5 commented Jan 23, 2025

This adds a prettier config.
Before this format on save changed a lot of lines.

@toger5 toger5 requested a review from AndrewFerr January 23, 2025 17:47
@toger5
Copy link
Contributor Author

toger5 commented Jan 23, 2025

I did two commits one with the changes and one with just yarn prettier:format

Copy link
Member

@AndrewFerr AndrewFerr left a comment

Choose a reason for hiding this comment

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

For some reason I'm able to get a slightly smaller diff by running Prettier on the original source:

git checkout master -- src/ test/ && yarn prettier:format && git add src/ test/

You can use it if you like.

@AndrewFerr
Copy link
Member

It should also be made clear that the code coverage test fails simply because this PR touches most source/test files, and the code coverage %age of the whole codebase is lower than the minimum per-PR coverage requirement...meaning 1) this is a false-positive and 2) code coverage should eventually be improved in general so this won't be an issue anymore!

@hughns
Copy link
Member

hughns commented Jan 24, 2025

@toger5 why not use the same shared config that matrix-js-sdk uses? https://github.com/matrix-org/matrix-js-sdk/blob/develop/.prettierrc.cjs

@AndrewFerr
Copy link
Member

@toger5 why not use the same shared config that matrix-js-sdk uses? https://github.com/matrix-org/matrix-js-sdk/blob/develop/.prettierrc.cjs

It does as of e7e2488

@hughns hughns enabled auto-merge (squash) January 27, 2025 11:21
@hughns
Copy link
Member

hughns commented Jan 27, 2025

For some reason I'm able to get a slightly smaller diff by running Prettier on the original source:

git checkout master -- src/ test/ && yarn prettier:format && git add src/ test/

You can use it if you like.

FTR, this was applied in 318dcc7 (#123)

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
63.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@hughns hughns requested a review from AndrewFerr January 27, 2025 12:18
@hughns hughns merged commit ad0cb68 into master Jan 27, 2025
3 of 4 checks passed
@hughns hughns deleted the toger5/prettier-config branch January 27, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants