> Validates classnames for any missing var before a custom property ## Description
npm install stylelint-no-missing-varThis 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.
``
npm install stylelint-no-missing-var
yarn install stylelint-no-missing-var
`
In your stylelintrc.json add stylelint-no-missing-var to your plugins array and to your rules array like this:
`js`
plugins: ['stylelint-no-missing-var'],
rules: {
"custom-rule/no-missing-var": true,
}
css
.spectrum-Well-Component {
background-color : (--prefix-component-background-color);
}
`Correct:
`css
.spectrum-Well-Component {
background-color : var(--prefix-component-background-color);
}
``