stylelint-no-missing-var

1.0.1 • Public • Published

stylelint-no-missing-var

Validates classnames for any missing var before a custom property

Description

This stylelint plugin will validate against all custom properties in css and lints when it fails to find var before a custom property. This plugin also works for custom property defined in other sources too.

Installation

npm install stylelint-no-missing-var

yarn install stylelint-no-missing-var

How to use

In your stylelintrc.json add stylelint-no-missing-var to your plugins array and to your rules array like this:

plugins: ['stylelint-no-missing-var'],
rules: {
  "custom-rule/no-missing-var": true,
}

Usage

Wrong: Throws an error here

.spectrum-Well-Component {
  background-color : (--prefix-component-background-color);
}

Correct:

.spectrum-Well-Component {
  background-color : var(--prefix-component-background-color);
}

Readme

Keywords

none

Package Sidebar

Install

npm i stylelint-no-missing-var

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

3.44 kB

Total Files

5

Last publish

Collaborators

  • castastrophe
  • rajrock38