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
Add reformat-files:css
script
#32351
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
9309cdc
to
47d3f8a
Compare
47d3f8a
to
5b8480d
Compare
5b8480d
to
8870ae1
Compare
rebased this and resolved the conflicts in package.json::scripts |
While at it, rename Stylelint config to `.stylelintrc.json` to get it automatically formatted by Prettier as well. See https://stylelint.io/user-guide/configuration/#loading-the-configuration-object for more about config file names. Run reformat-files:* in series, not in parallel Always happy exit reorganise
8870ae1
to
3a77fa0
Compare
Rebased. Still not sure if this is helpful or too risky (see the warning I added in description). This would be handy if we'd switch e.g. to this from our custom Stylelint config: {
"extends": "stylelint-config-wordpress/scss"
} |
This PR has been open for a while. Is it still relevant? |
This PR has been marked as stale due to lack of activity within the last 30 days. |
Autofixer might be now safe enough to use: stylelint/stylelint#2643 |
Considered closing this, but checked with Team Calypso (p1623060403258400-slack-team-calypso) and I think we can keep open until someone picks the stylelint work at some point. This will work as a good starting off point:
|
@noahtallen is this PR needed for the recent stylelint work or shall I close? Feel free to just hit close button yourself! :-) |
Yeah, I think it's worth closing! |
I didn't add a reformat files script, but that'd be incredibly easy to add if we need it. And just adding |
Adds
reformat-files:css
script that runsstylelint --fix
on files.There's this note in the docs:
Solution might be not run this together with
reformat-files
command and let folks run this only manually.Changes proposed in this Pull Request
reformat-files:css
script which always exists with0
— otherwise if there are errors left,--fix
will exit with2
and make it seem likereformat-files
failed.-c
inreformat-files
is meant to letreformat-files:js
finish even if:css
would exit with non-0 earlier, so I'm fine also changing it to throw an error at the end..json
to config file so that it'll get run through Prettier (docs about.json
support)Testing instructions
Run:
npm run reformat-files
reformat-files:js
finish even if:css
finishes earliernpm run reformat-files:css