Closed ehzhang closed 7 years ago
Hey @ehzhang, thanks for the PR!
I think this is a good change and reduces the chance of accidentally skipping linting on a file (as you experienced).
@davidtheclark Just to check, any historical reason that only /**
works?
Okay, merging. Thanks again @ehzhang, I'll get a release out shortly.
Thanks @simonsmith!
Thanks for this excellent plugin!
We've been using this to enforce our usage of suit-style css, but found that for some of our module definitions, the linter was silently failing when the module definitions were close but not quite right.
In this case, we found that the
/* @define Foo */
would look correct, but not trigger the linter.This seemed to be because the comment text provided by the
walkComment
callback includes everything after the initial/*
, so theDEFINE_DIRECTIVE
was matching against* @define Foo
, and just@define Foo
would fail the match.This PR adds an optional flag to the regex and adds some tests to ensure that a correctly defined definition recognizes a bad rule.
I noticed that there were some comments and PRs related (like this one) but I'm not sure if this is an intended behavior to only have the
/**
style vs also allowing/*
. Interested to hear your thoughts!