@fibery/stylelint-forbids-variables-with-name

Stylelint rule forbids the use of variables with a specific name.

Usage no npm install needed!

<script type="module">
  import fiberyStylelintForbidsVariablesWithName from 'https://cdn.skypack.dev/@fibery/stylelint-forbids-variables-with-name';
</script>

README

forbids-variables-with-name

Stylelint rule forbids the use of variables with a specific name.

Usage

Add it to your stylelint config plugins array, then add "@vizydrop/stylelint-forbids-variables-with-name" to your rules, specifying the variables which you want to check.

Like so:

// .stylelintrc
{
  "plugins": [
    "@vizydrop/stylelint-forbids-variables-with-name"
  ],
  "rules": {
    // ...
    "vizydrop/stylelint-forbids-variables-with-name": {
        forbiddenNames: [`@exactForbiddenTextColor`, `/@regEpx.+Color/`],
        ignoreNames: ['@exactForbiddenColor', '/^@regEpx.+Color$/'],
    }
    // ...
  }
}