2.0.3 • Published 4 months ago

@spectrum-tools/stylelint-no-unknown-custom-properties v2.0.3

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

stylelint-no-unknown-custom-properties

Report on any unused variable definitions

Installation

yarn add -D @spectrum-tools/stylelint-no-unknown-custom-properties

Usage

Assuming you have some variables defined and rule(s) that use them:

:root {
	--prefix-component-background-color: blue;
	--prefix-component-width: 10px;
	--prefix-component-height: 10px;
	--prefix-component-size: 10px;
}

.component {
	background-color: var(--prefix-component-background-color);

	width: var(--prefix-component-width);
	height: var(--prefix-component-height);
}

The variables that are not used in any rule will be reported to the console.

Options

ignoreList (default: [])

An array of strings or regular expressions that will be matched against the variable name. If a match is found, the variable will be ignored.

skipDependencies (default: true)

If set to false, the plugin will pull in and read the peerDependencies and dependencies for the package in which it is installed. It will then read-in and parse the provided CSS assets and check for any variables that are defined in the package's dependencies. If any are found, those variables will not be reported as unused.

2.0.3

4 months ago

2.0.2

5 months ago

2.0.1

5 months ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.2

1 year ago