Identify the selectors, which can be grouped as they have same set of properties and values.
Switch branches/tags
Nothing to show
Clone or download
sivanatarjan
sivanatarjan fixed md5 error
Latest commit 7605ebf Nov 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_tests_ removed line no for first selector in error message Oct 31, 2018
.gitignore
README.md update README.md Oct 30, 2018
index.js changed error messgae Nov 2, 2018
package-lock.json 1.0.6 Nov 14, 2018
package.json fixed md5 error Nov 15, 2018

README.md

stylelint-group-selectors

Identify the selectors, which can be grouped, as they have same set of properties and values.

  .a{ display: inline-block;width: 100px;}
  .b{display:inline-block;width:100px;}

Above selectors can be grouped like this

.a,.b{display:inline-block;width: 100px;}

Installation

npm install stylelint-group-selectors --save-dev

Usage

// .stylelintrc
{
  "plugins": [
    "stylelint-group-selectors"
  ],
  "rules": {
    "plugin/stylelint-group-selectors": true,
  }
}

Options

true

The following patterns are considered violations:

.b{display:inline-block;color:#111;}
.a{display:inline-block;color:#111;}
.a,.b{display: inline-block;color:#111; }