Skip to content

Linting Configuration

The simplest configuration:

extensions:
graphql-analyzer:
lint: recommended
extensions:
graphql-analyzer:
lint:
extends: recommended
rules:
noDeprecated: off # Disable a recommended rule
requireSelections: error # Enable an additional rule
extensions:
graphql-analyzer:
lint:
rules:
uniqueNames: error
noDeprecated: warn
LevelDescriptionAffects exit code?
errorShown as errorYes (exit 1)
warnShown as warningNo
offRule disabled

Some rules accept additional configuration via array or object syntax:

# Array syntax: [severity, options]
extensions:
graphql-analyzer:
lint:
rules:
requireSelections: [warn, { fieldName: ["id", "uuid"], requireAllFields: true }]
# Object syntax
extensions:
graphql-analyzer:
lint:
rules:
requireSelections:
severity: warn
options:
fieldName: ["id", "uuid"]
requireAllFields: true

Rule names use camelCase everywhere — in configuration, documentation, diagnostics, and ignore directives.