UNPKG

stylelint-selector-no-utility

Version:

Stylelint rule that doesn't allow the styling of utility classes in CSS

34 lines (32 loc) 576 B
const testRule = require('stylelint-test-rule-tape') const rule = require('..') testRule(rule.rule, { ruleName: rule.ruleName, config: true, skipBasicChecks: true, accept: [ { code: 'a { }' } ], reject: [ { code: '.m-0 { color: #fff; }' }, { code: '.m-0:hover { color: #fff; }' }, { code: '.m-2, .foo { color: #fff; }' }, { code: '.m-2[type=button] { color: #fff; }' }, { code: '.foo.m-0 { color: #fff; }' }, { code: '.border-black-fade { color: #fff; }' } ] })