Skip to content
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 .stylelintrc.json to @wordpress/create-block #35485

Closed
khoipro opened this issue Oct 9, 2021 · 2 comments
Closed

Add .stylelintrc.json to @wordpress/create-block #35485

khoipro opened this issue Oct 9, 2021 · 2 comments
Labels
[Package] stylelint config /packages/stylelint-config [Type] Enhancement A suggestion for improvement.

Comments

@khoipro
Copy link
Contributor

khoipro commented Oct 9, 2021

What problem does this address?

When creating a new block with core blocks, it's requires to modify some BEM Class which generated by core, such as:

.wp-block-group__inner-container

However latest @wordpress/create-block still report violating "Selector should use lowercase and separate words with hyphens selector-class-pattern".

What is your proposed solution?

Add .stylelintrc.json in package @wordpress/create-block to ignore this warning.

{
	"extends": "@wordpress/stylelint-config",
	"rules": {
		"selector-class-pattern": null
	}
}
@talldan talldan added [Tool] Create Block /packages/create-block Needs Technical Feedback Needs testing from a developer perspective. labels Oct 12, 2021
@gziolo gziolo added [Package] stylelint config /packages/stylelint-config and removed [Tool] Create Block /packages/create-block labels Oct 12, 2021
@khoipro
Copy link
Contributor Author

khoipro commented Dec 20, 2021

I think the patch should be there: https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/config/.stylelintrc.json

I will put my patch tomorrow.

@gziolo
Copy link
Member

gziolo commented Dec 22, 2021

Should we revisit #28954 instead that tried to make the rule better aligned with what Gutenberg uses? An alternative would be to disable the rule everywhere (in @wordpress/stylelint-config) until we have a better validator.

@gziolo gziolo closed this as completed in ee7618d Apr 20, 2022
@gziolo gziolo added [Type] Enhancement A suggestion for improvement. and removed Needs Technical Feedback Needs testing from a developer perspective. labels Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] stylelint config /packages/stylelint-config [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants