stylelint-bem icon indicating copy to clipboard operation
stylelint-bem copied to clipboard

Option to customize conventions

Open marcusds opened this issue 4 years ago • 9 comments

Type of issue

  • Feature request

This plugin is using the getbem.com standard instead of the BEM standard from bem.info (which is from the original creators of BEM), it would nice if the customize the BEM conventions to match what we are targeting. Thanks.

https://en.bem.info/methodology/naming-convention/

marcusds avatar Aug 27 '20 21:08 marcusds

This would be useful for using this package for linting SUIT CSS too. I'd like to use using this convention: MyBlock-myElement--myModifier

MatheusRich avatar Sep 10 '20 14:09 MatheusRich

I find this feature also good 👍🏻

pdaus1405 avatar Jan 08 '21 11:01 pdaus1405

Sorry, I've neglected this repo terribly. Thanks for the reminder. I'll try to take some time this weekend.

ernscht avatar Jan 08 '21 12:01 ernscht

No work? is the package died?

pdaus1405 avatar Jan 18 '21 11:01 pdaus1405

@pdaus1405 The last commit was dec/2020, I think it's not dead.

MatheusRich avatar Jan 18 '21 13:01 MatheusRich

but some comments, wishes and pr's and no movement

pdaus1405 avatar Jan 18 '21 14:01 pdaus1405

I am using this plugin in multiple projects and it works well.
Adding now tons of option will increase the complexity for configuration and maintenance.

That's the reason why we are cautious to add new options unless they are solving a common problem.

jantimon avatar Jan 18 '21 17:01 jantimon

Sorry guys for the late replies. And thanks for the feature request.

In addition to Jan's answer: As you can see from the examples, we didn't just take over rules, but also extended them. The Linting Tool represents our idea of how the class names should be structured. This has developed over the years. For example, we decided to only allow lower case letters. On the one hand this is very readable, on the other hand it's easy to lint.

We are aware that this stylelint plugin cannot be used to lint different bem naming conventions, which is why we have decided to publish the package scoped. We want to offer a simple, clear plugin and keep the complexity small to remain maintainable.

Do you know this stylelint plugin stylelint-selector-bem-pattern? It offers configuration options for different naming conventions. It didn't match our needs, but maybe it goes in the direction you want?

ernscht avatar Jan 18 '21 21:01 ernscht

thank you, i know the plugin. unfortunately it is dead and can no longer cope with the current stylelint version.

pdaus1405 avatar Jan 25 '21 11:01 pdaus1405

Closing, due to the fact, that this is an optiniated scoped stylelint plugin to follow our idea of how the class names should be structured. We will not invest additional development time in ideas that generate work for us but add little value. PR's we would of course like to discuss.

ernscht avatar Jul 06 '23 17:07 ernscht