This package has been deprecated

Author message:

This package is DEPRECATED now! Use stylelint-value-no-exposed-custom-properties instead.

stylelint-postcss-custom-properties

1.2.0 • Public • Published

stylelint-postcss-custom-properties

A stylelint plugin that reveals values defined with PostCSS Custom Properties plugin.

A error from the plugin looks like this:

1:1  ✖  The value (or a part of it) should be presented as a custom property: "#FFF" is "--white"

Installation

npm install stylelint-postcss-custom-properties

Usage

Add it to your stylelint config plugins array, then add "plugin/postcss-custom-properties" to your rules, specifying the customPropertiesFilePath option with path of a JSON or JS file that contains list of custom properties.

Like so:

// .stylelintrc
{
  "plugins": [
    "stylelint-postcss-custom-properties"
  ],
  "rules": {
    // ...
    "plugin/postcss-custom-properties": {
       "customPropertiesFilePath": "./customProperties.json"
    },
    // ...
  }
}

Custom properties file format

For now, the plugin works with JSON or JS files only, CSS files are not supported.

See example files written in JSON and JS.

Package Sidebar

Install

npm i stylelint-postcss-custom-properties

Weekly Downloads

18

Version

1.2.0

License

MIT

Unpacked Size

4.33 kB

Total Files

4

Last publish

Collaborators

  • raslov