fix(scripts): Use the SCSS shared stylelint-config-wordpress config - #17060
Conversation
jorgefilipecosta
left a comment
There was a problem hiding this comment.
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 |
gziolo
left a comment
There was a problem hiding this comment.
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-stylewp-scriptscommand the SCSS rules fromstylelint-config-wordpressare not used, this results in lint errors being displayed when linting SCSS files.By updating the config to use the
stylelint-config-wordpress/scssshared 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-stylescript against thescss-valid.scssfile:If successful there should be no errors displayed.
If unsuccessful the following errors will be displayed:
Screenshots
Types of changes
Checklist: