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
Use prettier v2 #2324
Use prettier v2 #2324
Conversation
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'd like to merge #2251 before this one, so IE users can have one final fix, before a new major release that drops support for that runtime. |
829f7dc
to
7f78d9a
Compare
45a321b
to
987a9e6
Compare
987a9e6
to
8ae78e7
Compare
Working on this PR with @hexeberlin today, we discovered that my assumptions about the Prettier upgrade were flawed. At https://prettier.io/docs/en/options.html#trailing-commas, it is specified that Default value changed from none to es5 in v2.0.0 As in the MDN article about trailing commas, it's clear that ES5 trailing commas are supported in IE11 Therefore, upgrading to This can be verified by checking out this branch and running I've updated the label for this PR, to use This means that we can leave the dropping of IE11 to when we import an upgraded Every day is a school day... |
I still haven't figured out how to get |
It doesn't matter what is wrong. If a file fails the check, it needs to be formatted with prettier. Then it will pass the check. The whole point is that you don't make formatting changes manually anymore. |
That pretty much destroys staging parts of files, which I do all the time, to be able to craft a good git narrative |
Use a prettier plugin. There is one for every editor. I configured mine to detect prettier configs to have it enabled only for projects that have one. It then formats on save. |
Downstream projects have switched to using `prettier --check` to verify that code follows style guide. Example: sinonjs/sinon#2324
Downstream projects have switched to using `prettier --check` to verify that code follows style guide. Example: sinonjs/sinon#2324
Downstream projects have switched to using `prettier --check` to verify that code follows style guide. Example: sinonjs/sinon#2324
Downstream projects have switched to using `prettier --check` to verify that code follows style guide. Example: sinonjs/sinon#2324
Downstream projects have switched to using `prettier --check` to verify that code follows style guide. Example: sinonjs/sinon#2324
This PR upgrades
prettier
to latest and removes local configuration, adoptingprettier
default options.Solution - optional
prettier
.prettierrc
, accepting the default optionsprettier
.editorconfig
How to verify - mandatory
npm install
npm run prettier:check
npm run lint
npm run test-cloud
Checklist for author
npm run lint
passes