🎉 Welcome to the new GraphQL-ESLint website. Try new playground page →
Rules
`prettier` Rule

prettier Rule

eslint-plugin-prettier supports .graphql files, and v4.1.0 supports graphql blocks even better. You need to do the following:

.eslintrc.json
{
  "overrides": [
    {
      "files": ["*.js"],
      "processor": "@graphql-eslint/graphql",
      "extends": ["plugin:prettier/recommended"]
    },
    {
      "files": ["*.graphql"],
      "parser": "@graphql-eslint/eslint-plugin",
      "plugins": ["@graphql-eslint"],
      "rules": {
        "prettier/prettier": "error"
      }
    }
  ]
}

You can take this repository (opens in a new tab) as example.