2.0.2 • Published 4 months ago

@spectrum-tools/stylelint-no-missing-var v2.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 months ago

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

yarn add -D 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);
}
2.0.2

4 months ago

2.0.1

10 months ago

2.0.0

12 months ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

2 years ago