Sorry, had to go hunt this down and get it out of the moderation queue.

As I mentioned on the GitHub issue, rules can't affect other rules. Your
best bet would be to require() an existing rule and use that to implement
your new rule.

On Mon, Jan 12, 2015 at 7:42 AM, Nate Cavanaugh <[email protected]>
wrote:

> Hi there,
> I'm wondering if it's possible to invoke one rule from another rule, or
> somehow reuse the code from one rule to another.
> What I'm trying to do is suppress a certain rule under certain conditions
> (as an example, I want the no-undef rule to run most of the time, but for
> certain files/filetypes, I want to ignore only that one rule).
> My idea was to create a custom rule, and do my checking in there. However,
> I would like to avoid duplicating all of the code in that rule.
> Is there some way to invoke it from my custom rule, or, is there a way to
> conditionally suppress that rule in certain situations?
>
> Thanks in advance :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "ESLint" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 

______________________________
Nicholas C. Zakas
@slicknet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to