eslint-plugin-graphql icon indicating copy to clipboard operation
eslint-plugin-graphql copied to clipboard

Can't lint dot files (.babelrc.js) when using graphql-config to get schema

Open tw0517tw opened this issue 7 years ago • 0 comments
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

tw0517tw avatar Sep 06 '18 11:09 tw0517tw