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

schemaJsonFilepath incompatible with `eslint --cache`

Open glasser opened this issue 7 years ago • 0 comments
trafficstars

If you use the schemaJsonFilepath option to specify your schema and you use eslint --cache, then changing your schema won't cause files to be re-evaluated.

So for example, you could get an eslint error because you're using a brand new field, use the apollo CLI to update your schema.json, and re-run eslint --cache, but the error will show up again.

This doesn't happen with schemaJson and schemaJsonString, because these embed the schema directly into the config, and a hash of the config is included in .eslintcache.

At the very least, the docs around schemaJsonFilepath could warn about this?

glasser avatar Oct 19 '18 05:10 glasser