0.0.2 • Published 4 years ago

@maxwoo-houzz/stylelint-no-restricted-imports v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

StyleLint no-restricted-imports Plugin

Install

npm install @maxwoo-houzz/stylelint-no-restricted-imports

Usage

in your .stylelintrc file:

{
	"plugins": ["@maxwoo-houzz/stylelint-no-restricted-imports"],
	"rules": {
		"plugin/no-restricted-imports": {
			"paths": ["test/path"],
			"patterns": ["test/pattern/**/*.css"]
		}
	}
}

The paths option supports either a string or array of strings, specifying exact paths to blacklist.

The patterns option supports either a single string or array of strings, where each string must be a .gitignore pattern.

So the above configuration will throw a linter error on any of the following imports:

@import 'test/path';
@import 'test/pattern/a.css';
@import 'test/pattern/a/b.css';

Test

npm test