-
Notifications
You must be signed in to change notification settings - Fork 167
chore(codestyle): apply prettier to packages #1416
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
chore(codestyle): apply prettier to packages #1416
Conversation
Slightly unexpected, but I don't know why code in packages was not aligned with configured tool for code styling. In my setup, when formatting is applied on every Ctrl+S it leads to massive changes and huge git diff. So fixing style issue and will add more PR's later |
Thank you very much @wermanoid for your PullRequest. I will merge this PullRequest before #1410 and also this one before #1402. It may impact your PullRequest. |
I will keep it up-to-date, so merge anything that is needed :) no problems Btw, maybe it worth also to check prettier config too? Tbh, this is first time when I see that someone is using If you don't mind, I can change to this:
|
@wermanoid I would suggest reviewing the prettier config to align to the existing project source, and agree tab should be replaced with whatever the most common existing pattern is in the project, which appears to be i.e. treat the project's existing approach as preferred and adjust prettierrc to conform, vs prettier being the point of truth now. Also, there appears to be a disconnect between ESlint running prettier rules and running prettier externally. Ideally, ESlint should be reading the prettier config and if request autofix with @guillaume-chervet does this sound ok? |
@wermanoid @guillaume-chervet |
f087864
to
98714d7
Compare
Updated after all eslint fixes Also, do I need to fix TS errors that prevents pipeline to pass? Or better to make that as another PR? |
6bb83bd
to
5988cd6
Compare
}; | ||
|
||
public withTestingDefault(): OidcConfigBuilder { | ||
this.oidcConfig.configurationName = 'test'; | ||
this.oidcConfig.tokens = new TokenBuilder().withNonExpiredToken().build(); | ||
this.oidcConfig.status = 'NOT_CONNECTED'; | ||
this.oidcConfig.state = { tab1: 'state' }; |
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.
I think the correct new version is { tab1: 'state' }; in the whole file @wermanoid
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.
I think it explain why unit tests are failing @wermanoid
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.
Em... But I didn't touch any code in pr. There was only format... So that is broken is main, but was merged?
Weird... but ok, will try to update
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.
Ok, updated from clear main branch. Should not introduce anything unexpected now
@jafin I do not code a lot in Javascript/typescript these days (unfortunately). This configuration seems OK to you? |
5988cd6
to
8f9629f
Compare
8f9629f
to
042ef3f
Compare
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.
Thank you very much @wermanoid I merge like it and I will fixe the few Types erros in another PullRequest.
A picture tells a thousand words
There is a
prettier
and.prettierrc.cjs
in repoBefore this PR
It was not applied to code, so any change leads to massive file changes
After this PR
Just applied code formatting for packages, so less annoying and unexpected file changes
How to reproduce
run
pnpm prettier --write --cache packages