stylelint / jest-preset-stylelint

Common configuration options for Jest in Stylelint environments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix testing disable comment plugins by using `ignoreDisables`

DMartens opened this issue · comments

commented

What is the problem you're trying to solve?

I am currently writing a plugin for disable comments.

The problem are disable comments like /* stylelint disable */ as they disable all rules.
As such they also disable the rule I try to test.

What solution would you like to see?

I saw #26 which would solve the issue partially but for some reason that PR is not merged.
Personally I would prefer directly passing the config to getTestRule like the options so they are shared between the rules.

Another way to solve this is to always set ignoreDisables to true as no rule author should test whether the disables work.

Another way to solve this is to always set ignoreDisables to true as no rule author should test whether the disables work.

This sounds viable to me. I'll label as discussion in case anyone else has thoughts.