Closed DerZyklop closed 2 years ago
the plugin was trying to load all installed eslint plugins (including eslint-plugin-graphql
). looks like you have installed eslint-plugin-graphql
, it requires graphql
, but not installed.
Thanks for the quick reply!
looks like you have installed
eslint-plugin-graphql
When I installed eslint-plugin-no-autofix
I did not have eslint-plugin-graphql
installed myself. But here is what I found… I had @shopify/eslint-plugin
installed which requires eslint-plugin-graphql
here:
https://github.com/Shopify/web-configs/blob/main/packages/eslint-plugin/package.json#L45
So when I run npm install, eslint-plugin-graphql
already gets added to …/node_modules/
Shouldn’t eslint-plugin-no-autofix
then be able to load it correctly?
yes, it should be. but eslint-plugin-graphql
has a peerDeps graphql
.
if you are using npm >=7, peerDeps will be installed automatically, But if not(e.g. yarn/pnpm), you will have to list graphql
in your deps.
closing, as it's not an issue in the plugin.
It seems like your package relies on
eslint-plugin-graphql
.When i tried to use it in my project i got this:
Installing it via
npm i eslint-plugin-graphql -D
fixed it for me.eslint-plugin-graphql is not listed in your package.json.