UNPKG

linter-bundle

Version:

Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.

163 lines (123 loc) 2.26 kB
# selector-attribute-operator-space-before Require a single space or disallow whitespace before operators within attribute selectors. <!-- prettier-ignore --> ```css [target =_blank] /** ↑ * The space before operator */ ``` The [`fix` option](https://stylelint.io/user-guide/options/#fix) can automatically fix all of the problems reported by this rule. ## Options `string`: `"always"|"never"` ### `"always"` There _must always_ be a single space before the operator. The following patterns are considered problems: <!-- prettier-ignore --> ```css [target=_blank] {} ``` <!-- prettier-ignore --> ```css [target= _blank] {} ``` <!-- prettier-ignore --> ```css [target='_blank'] {} ``` <!-- prettier-ignore --> ```css [target="_blank"] {} ``` <!-- prettier-ignore --> ```css [target= '_blank'] {} ``` <!-- prettier-ignore --> ```css [target= "_blank"] {} ``` The following patterns are _not_ considered problems: <!-- prettier-ignore --> ```css [target] {} ``` <!-- prettier-ignore --> ```css [target =_blank] {} ``` <!-- prettier-ignore --> ```css [target ='_blank'] {} ``` <!-- prettier-ignore --> ```css [target ="_blank"] {} ``` <!-- prettier-ignore --> ```css [target = _blank] {} ``` <!-- prettier-ignore --> ```css [target = '_blank'] {} ``` <!-- prettier-ignore --> ```css [target = "_blank"] {} ``` ### `"never"` There _must never_ be a single space before the operator. The following patterns are considered problems: <!-- prettier-ignore --> ```css [target =_blank] {} ``` <!-- prettier-ignore --> ```css [target = _blank] {} ``` <!-- prettier-ignore --> ```css [target ='_blank'] {} ``` <!-- prettier-ignore --> ```css [target ="_blank"] {} ``` <!-- prettier-ignore --> ```css [target = '_blank'] {} ``` <!-- prettier-ignore --> ```css [target = "_blank"] {} ``` The following patterns are _not_ considered problems: <!-- prettier-ignore --> ```css [target] {} ``` <!-- prettier-ignore --> ```css [target=_blank] {} ``` <!-- prettier-ignore --> ```css [target='_blank'] {} ``` <!-- prettier-ignore --> ```css [target="_blank"] {} ``` <!-- prettier-ignore --> ```css [target= _blank] {} ``` <!-- prettier-ignore --> ```css [target= '_blank'] {} ``` <!-- prettier-ignore --> ```css [target= "_blank"] {} ```