Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value "literal" must be an enum value #38

Closed
stefanorg opened this issue Dec 14, 2016 · 3 comments
Closed

Value "literal" must be an enum value #38

stefanorg opened this issue Dec 14, 2016 · 3 comments

Comments

@stefanorg
Copy link
Contributor

with the latest release i get:

Error: /home/stefano/lavoro/db-network-app/.eslintrc.js: Configuration for rule "graphql/template-strings" is invalid: Value "literal" must be an enum value.
Error: /home/stefano/lavoro/db-network-app/.eslintrc.js:
	Configuration for rule "graphql/template-strings" is invalid:
	Value "literal" must be an enum value.
    at validateRuleOptions (/home/stefano/lavoro/db-network-app/node_modules/eslint/lib/config/config-validator.js:115:15)

looking at source: https://github.com/apollostack/eslint-plugin-graphql/blob/master/src/index.js#L61

it seems that something is missing, or i'm doing something wrong?

my .eslintrc.js is

module.exports = {
  parser: "babel-eslint",
  rules: {
    "graphql/template-strings": ['error', {
      // Import default settings for your GraphQL client. Supported values:
      // 'apollo', 'relay', 'lokka', 'literal'
      env: 'literal',

      // Import your schema JSON here
      schemaJson: require('./app/graphql/schema.json'),

      // OR provide absolute path to your schema JSON
      // schemaJsonFilepath: path.resolve(__dirname, './schema.json'),

      // tagName is gql by default
    }]
  },
  plugins: [
    'graphql'
  ]
}

@stubailo
Copy link
Contributor

@stefanorg that's a good point, looks like literal is not included in the schema. Mind sending a quick PR to add it?

@stefanorg
Copy link
Contributor Author

stefanorg commented Dec 15, 2016 via email

stefanorg added a commit to stefanorg/eslint-plugin-graphql that referenced this issue Dec 15, 2016
@jnwng
Copy link
Contributor

jnwng commented Jan 25, 2017

looks like this was resolved, please re-open if not!

@jnwng jnwng closed this as completed Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants