ESLint

Lint your GraphQL with ESLint

GraphQL ESLint integrates GraphQL into ESLint: it parses .graphql files and GraphQL embedded in your code, validates schemas and operations, and enforces the conventions your team agrees on. Part of the Hive ecosystem by The Guild.

ESLint, extended to GraphQL

One config object

Register the parser and plugin for .graphql files, pick a shared config or individual rules, and ESLint does the rest — on the command line and in your editor.

Get started
import graphqlPlugin from '@graphql-eslint/eslint-plugin';

export default [
  {
    files: ['**/*.graphql'],
    languageOptions: {
      parser: graphqlPlugin.parser,
    },
    plugins: {
      '@graphql-eslint': graphqlPlugin,
    },
    rules: {
      ...graphqlPlugin.configs['flat/schema-recommended'].rules,
      '@graphql-eslint/require-description': ['error', { types: true }],
    },
  },
];

Learn more

Discover the complete ecosystem of tools and libraries

Complete GraphQL Federation Stack

Our libraries to support all your GraphQL needs

Explore the Ecosystem