apollographql / eslint-plugin-graphql

:vertical_traffic_light: Check your GraphQL query strings against a schema.

Home Page:https://www.npmjs.com/package/eslint-plugin-graphql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting env and tagName together makes rule fail silently

garcianavalon opened this issue · comments

Specifying both env and tagName is causing rules to silently fail internally with out any errors:

// this works 
'graphql/template-strings': [
  'error', {
    // I'm using .graphqlconfig to import the schema
    env: 'literal',
}],
// this fails silently ->  eslint will say the file is valid, no error shown nor thrown
'graphql/template-strings': [
  'error', {
    // I'm using .graphqlconfig to import the schema
    env: 'literal',
    tagName: 'gql'  // <- don't do this
}],

I think this should not happen. I don't know whats wrong with both using env and tagName but it should not fail silently and this should be considered a bug

Originally posted by @garcianavalon in #252 (comment)