Skip to content

hoonweiting/stylelint-at-include-disallowed-list

Repository files navigation

at-include-disallowed-list

Stylelint rule for specifying a list of disallowed mixins to at-include (@include).

Installation

npm install stylelint-at-include-disallowed-list --save-dev

Usage

Add this config to your Stylelint configuration file:

{
  "plugins": ["stylelint-at-include-disallowed-list"],
  "rules": {
    "plugin/at-include-disallowed-list": [
      [
        "array",
        "of",
        "mixins"
      ]
    ]
  }
}

The message secondary option can accept the arguments of this rule.

Options

array|string: ["array", "of", "mixins"]|"mixin"

Given:

["foo", "bar", "foo\\/bar"]

The following patterns are considered problems:

a {
  @include foo;
}
a {
  @include bar();
}
a {
  @include foo\/bar();
}

The following patterns are not considered problems:

a {
  @include foobar;
}
a {
  @include foo\\/bar-baz();
}

About

Stylelint rule for disallowing mixins to at-include

Resources

License

Stars

Watchers

Forks

Packages

No packages published