Reputation: 35
Hi want to ignore certain files for a specific rule in style lint config js like below
'color-named': [
'never', {
'ignore': [ 'library/styles/**/*.css', 'components/**/styles/variable.css' ]
}
],
However this is not working, Any suggetions how to do that ?
Upvotes: 2
Views: 1172
Reputation: 3951
There is no ignore
configuration option which accepts globs in stylelint.
I believe you have two choices:
/* stylelint-disable color-named */
to the beginning of the appropriate files (ref).color-named
rule turned on and one with it turned off. Then run stylelint twice with different globs, using the --config
option to select the appropriate config. You can make use of extendable configs to remove duplication within the configs e.g. have a base
config and a strict
config that extends the base
config and turns on the color-named
rule (ref).Upvotes: 2