Thank you for your reply!  I already found a solution to the first part of 
the problem.  This clever trick allows a plugin to lint itself: 
https://github.com/not-an-aardvark/eslint-plugin-self

I did end up reaching out to npm directly to see if they have a 
recommendation for dealing with the circular dependencies.  I'll post back 
here if/when I get an answer.

On Tuesday, September 5, 2017 at 12:38:29 PM UTC-4, Nicholas Zakas wrote:
>
> I think this is more of an npm question than an ESLint question. 
>
> What I'd do is publish your plugin as an empty project with no 
> dependencies. Then, update your dependent projects to reference the plugin, 
> then update your plugin with the dependencies. I'm not sure if that would 
> accomplish what you're trying to do, but that's how I would start. 
>
> You may want to follow up with the npm folks for further clarification on 
> how these dependencies will be handled. 
> On Sun, Sep 3, 2017 at 5:34 PM Steven Olmsted <[email protected] 
> <javascript:>> wrote:
>
>> Hello,
>>
>> I'm working on an ESLint plugin with some custom rules.  I've split the 
>> more complicated logic into smaller pieces and I intend to publish these 
>> pieces as standalone npm modules.  The plugin's package.json will list 
>> these modules as dependencies.  I'm wondering, can I use the custom rules 
>> from the plugin to lint the dependency modules?  If the dependency modules 
>> list the plugin as a devDependency, then the plugin will have a circular 
>> dependency on itself.  It also feels like a chicken/egg problem.  If these 
>> modules mutually depend on each other, when I try to publish the first 
>> module will npm allow it to have a dependency that isn't published yet?
>>
>> Has this come up before?  I looked at some popular plugins on GitHub.  
>> They usually lint themselves but without enabling any custom rules so there 
>> are no circular dependencies.
>>
>> Thanks,
>> Steven
>>
>> -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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