-
Notifications
You must be signed in to change notification settings - Fork 35
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
feature / improvement request to check for BEMIT and more #117
Comments
Hi @gael-boyenval, I like the idea that you have here but I wonder if the amount of effort needed to implement it would outweigh the benefits. Apart from BEMIT are there that many other implementations of BEM being used that people would want to implement as a configuration such as this? It might be simpler to look into adding BEMIT as a proper preset alongside SUIT and the traditional BEM. If more and more users opened issues for different flavours of BEM (that the current customisation options cannot fulfill) then maybe it would be time to consider overhauling the API. What do you think? |
Hi @simonsmith, yes I completely understand. Adding the preset would be a great thing. Personally, I want to give it a more complete approach by the ability to forbid The other part of creating prefixed class is that it create a sort of "typed css" approach. This could allow to apply different rules to each types. Also, I'm implementing another approach. Something based on ITCSS, but not exactly. I would love to see a plugin that allow users to have complete control over this, through configuration. I completely understand that it would be big rewriting of So, I'm already taking the firsts steps to build a Stylelint Plugin. I may post here the link to the repo. I would be glad that you agree to participate, guide me a bit or code review me in this effort, because it doesn't look like very documented and the learning curve seem pretty steep to me ;) I have some difficulties to harness the full potential of postcss and stylelint built-in capabilities, due to a lack of comprehensive documentation. Thank's for your answer, and your time. I hope we will discuss the subject again. GB |
Hi Gael, did you finally worked on this? How are you doing it right now? |
@diegosantamarta I've started something, but it's a wile ago and I have been carried away by other projects. Would you be interested to work on it with me ? I currently have a project that could use this ! |
Hi, this was initially posted as an issue in stylelint repo.
Feature : a customizable BEMIT selector syntax checker
the BEM linter is great but it doesn't allow to customize enough to enforce BEMIT @csswizardry (Harry Roberts) proposal.
a great article about BEMIT here or for the lazy ones : BEMIT Cheatsheet
it's about namespaced BEM selectors, and enforce different rules for those deferents types.
some of the BEMIT types:
.s-
.t-
.c-
.is- | .has- | .no-
...some "types" can be combined :
.c-component.is-open
=> okbut others not :
.c-component-a .c-component-b
=> warnimplementing a strict ruleset would be great but being able to configure it and create our own would be even better :
each selectors would be evaluated, the first class would be considered has the "host" and all other has "hosted" :
exemple :
with the given registered types :
lint results :
there is obviously many uses case that are not taken in account here, and the naming conventions that I used is certainly not the best, but you get the spirit…
I'm not very confident that you would agree to change so much of your plugin's philosophy to match those requirements, but I was wondering about forking your repo and maybe build on top of what's have already been accomplished here.
It would be very nice of you to point me to the right direction. :)
Maybe some peoples would be interested to work with me on that to.
cheers :)
GB
The text was updated successfully, but these errors were encountered: