-
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
fix(scripts): Use the SCSS shared stylelint-config-wordpress config #17060
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.
Hi @ntwb thank you for looking into this problem,
When I execute ./node_modules/.bin/wp-scripts lint-style 'scss-valid.scss'
I get the following error:
21:2 ✖ Expected newline after "}" block-closing-brace-newline-after
I get exactly the same error in master. Is that expected? I'm doing something wrong?
@jorgefilipecosta That's correct, its also the current behaviour which this PR is aiming to fix. The reason you're getting this error still is because the old stylelint config is still being used, you'd need to remove the |
Shouldn't we apply it to the config file in the root of the Gutenberg project? I mirrored it in |
I see the same issue unless I update Line 2 in 2e45a8b
to use
|
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.
We can land it as is, but we will need a follow-up for the Gutenberg itself.
…ordPress#17060) * fix(scripts): use the SCSS shared stylelint-config-wordpress config * Update CHANGELOG.md
…17060) * fix(scripts): use the SCSS shared stylelint-config-wordpress config * Update CHANGELOG.md
…17060) * fix(scripts): use the SCSS shared stylelint-config-wordpress config * Update CHANGELOG.md
Description
When using the
lint-style
wp-scripts
command the SCSS rules fromstylelint-config-wordpress
are not used, this results in lint errors being displayed when linting SCSS files.By updating the config to use the
stylelint-config-wordpress/scss
shared config then both CSS and SCSS files are linted correctly.How has this been tested?
Download a valid SCSS file, e.g. scss-valid.scss and run the
lint-style
script against thescss-valid.scss
file:If successful there should be no errors displayed.
If unsuccessful the following errors will be displayed:
Screenshots
Types of changes
Checklist: