eslint-plugin-graphql
eslint-plugin-graphql copied to clipboard
Can't lint dot files (.babelrc.js) when using graphql-config to get schema
trafficstars
This plugin try to get schema using graphql-config, but graphql-config will not match dot files and return undefined for projectConfig in below lines.
https://github.com/apollographql/eslint-plugin-graphql/blob/fe6f6d7627605d2b1259bf19cba6985bf53fd671/src/index.js#L280-L283
The plugin will throw Cannot read property 'getSchema' of undefined error when running on dot files like .eslintrc.js or .babelrc.js.
I've send a PR to graphqh-config to match dot files.
https://github.com/prisma/graphql-config/pull/112