-
Notifications
You must be signed in to change notification settings - Fork 108
Description
I've worked around the issue by changing my config to a json, but I spent alot of time debugging this so I will try to help others.
the eslint plugin calls graphql configs loadConfigSync method with a root directory.
graphql config uses cosmiconfig - it uses a createCosmiConfigSync which uses the sync methods of createCosmiConfig and it correctly finds the file synchronously. However in prepareCosmiconfig it uses the default loader for js
rather than the js sync loader. So js files get loaded async and a promise gets set as the config passed to graphql-config constructor, meaning no valid projects are found, which then results in the eslint package giving an error.
It seems 100% a bug in graphql-config so I raised a bug there, but since no-one seems to have found it, wanted to point it out here as we didn't get it until upgrading the plugin: graphql-hive/graphql-config#1454