1.0.0 • Published 9 years ago

polish-match-stylesheet-names-to-rules v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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.

Build Status

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.