-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Scripts: Add lint-style script based on stylelint #12722
Conversation
Looks good to me! |
I think we should follow up in a subsequent pull request to add docs and a configuration for linting SCSS files. I originally wrote the above and what I was going to write here was about using |
The This file should remain in its current location and a new file should be created at {
"extends": "stylelint-config-wordpress"
}
The It uses [stylelint](https://github.com/stylelint/stylelint) with the [stylelint-config-wordpress](https://github.com/WordPress-Coding-Standards/stylelint-config-wordpress) configuration per the [WordPress CSS Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/). |
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.
The notes at #12722 (comment) should be addressed before merge
Thanks @ntwb for sharing your feedback. I'm in transit and will get back to it later this week. Unless you want to apply proposed changes yourself :) |
What would be the difference? I assumed they are the same in the context of Gutenberg. |
8cb82a6
to
668eebb
Compare
8262733
to
bee953b
Compare
Co-Authored-By: gziolo <grzegorz@gziolo.pl>
bee953b
to
8897178
Compare
* Scripts: Add lint-css script based on stylelint * Update packages/scripts/README.md Co-Authored-By: gziolo <grzegorz@gziolo.pl> * Update default config for lint-style script * Scripts: Extend description for the package
* Scripts: Add lint-css script based on stylelint * Update packages/scripts/README.md Co-Authored-By: gziolo <grzegorz@gziolo.pl> * Update default config for lint-style script * Scripts: Extend description for the package
Description
This PR adds
lint-style
towp-scripts
exposed by@wordpress/scripts
package.It helps enforce coding style guidelines for your style files. It uses stylelint with the set of default rules provided. You can override them with your own rules as described in stylelint user guide.
How has this been tested?
npm run lint-css
still works properly in the repository../node_modules/.bin/wp-scripts lint-style '**/*.scss'
also works properly