Jitendra Vyas Jitendra Vyas - 6 months ago 35
CSS Question

Is it possible to show warning in stylelint if already used class being used again?

In stylelint or with any other tool is it possible if a developer is writing a class name in CSS file, for example,

.somethingRed {}
he gets a message that this class name has been already used if the similar class name has been used already in the project ?

Answer

This is achievable in stylelint using the no-duplicate-selectors rule.