eslint-plugin-graphql
eslint-plugin-graphql copied to clipboard
Invalid configuration rule for "graphql/template-strings"
trafficstars
Hi, I'm getting an unexpected validation rule error from giving an array of desired validators as per instructions. I had no issues with this configuration for [email protected] and [email protected] but don't see why it wouldn't work for the following package versions either.
module.exports = {
parser: "babel-eslint",
rules: {
'graphql/template-strings': [
'error',
{
env: 'apollo',
validators: ['FieldsOnCorrectType'],
},
],
},
plugins: ['graphql']
};
is giving the following error
Configuration for rule "graphql/template-strings" is invalid:
Value "FieldsOnCorrectType" should be equal to one of the allowed values.
Value ["FieldsOnCorrectType"] should be equal to one of the allowed values.
Value ["FieldsOnCorrectType"] should match exactly one schema in oneOf.
Versions
Since you're using graphql 15, I believe that you have to add "Rule" suffix to your validators. So FieldsOnCorrectType should become FieldsOnCorrectTypeRule
Check this PR for more info : https://github.com/apollographql/eslint-plugin-graphql/pull/281