Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should using plugin:relay/{recommended,strict} should automatically reference the plugin? #90

Open
nirvdrum opened this issue Apr 22, 2020 · 0 comments

Comments

@nirvdrum
Copy link

I apologize for the indecision on whether this issue is a bug report or a support question. At the heart of it, my ESLint config consists of extends from several different plugins (e.g., eslint-plugin-react), none of which need an explicit reference in the plugins section. Based on that, I'd expect that if I use extends: ['plugin:relay/recommended'] that that would imply plugins: ['relay'], but it currently does not.

Before opening this issue, I tried to see if ESLint was specially handling these other plugins or if the plugins were violating some spec, but still working incidentally. Unfortunately, I couldn't find anything conclusive. The ESLint docs give examples where the plugins section is populated, but don't really say if that's a requirement. Interestingly, the eslint-plugin-react example config is different than the one in eslint-plugin-react's docs and says you don't need to populate plugins if using an extends ruleset.

If this functionality can't be added, then I think the docs could be enhanced. While I realize adding 'relay' to the plugins section is step 1 of "How to Use", it's paired with a step 2 that discusses activating individual rules. I misread the part about using "plugin:relay/recommended" as an alternative to both steps that preceded it, rather than just the most recent step. I was likely primed to misread that based on my experience with other ESLint plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant