polish-match-stylesheet-names-to-rules
v1.0.0
Published
Polish plugin to flag files where the top-level selector does not match the style name.
Downloads
3
Readme
polish-match-stylesheet-names-to-rules
Polish plugin to flag files where the top-level selector does not match the style name. This encourages small files and componentized Sass.
Installation
npm install polish-match-stylesheet-names-to-rules
Note that this only works for Sass & SCSS.
Example
Filename: _global_header.scss
Enforced structure:
.global-header {
...
~ .button {
...
}
}
Both the filename and the top-level selector are lowercased, and underscores are globally replace with hyphens, before doing a comparison.