Usage
Quickstart
Installation
Install the plugin package with your favourite package manager.
npm i -D @graphql-eslint/eslint-plugin
⚠️
Warning
Make sure you have graphql
dependency in your project.
Configuration
Create a new
configuration object
in your eslint.config.js
file to setup @graphql-eslint
plugin.
eslint.config.js
import graphqlPlugin from '@graphql-eslint/eslint-plugin'
export default [
// ... other config
{
files: ['**/*.graphql'],
languageOptions: {
parser: graphqlPlugin.parser
},
plugins: {
'@graphql-eslint': graphqlPlugin
}
}
]
Usage
Basic
Advanced
Last updated on