Linting Configuration
Using a preset
Section titled “Using a preset”The simplest configuration:
extensions: graphql-analyzer: lint: recommendedPreset with overrides
Section titled “Preset with overrides”extensions: graphql-analyzer: lint: extends: recommended rules: noDeprecated: off # Disable a recommended rule requireSelections: error # Enable an additional ruleRules only (no preset)
Section titled “Rules only (no preset)”extensions: graphql-analyzer: lint: rules: uniqueNames: error noDeprecated: warnSeverity levels
Section titled “Severity levels”| Level | Description | Affects exit code? |
|---|---|---|
error | Shown as error | Yes (exit 1) |
warn | Shown as warning | No |
off | Rule disabled | — |
Rule options
Section titled “Rule options”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 syntaxextensions: graphql-analyzer: lint: rules: requireSelections: severity: warn options: fieldName: ["id", "uuid"] requireAllFields: trueRule name format
Section titled “Rule name format”Rule names use camelCase everywhere — in configuration, documentation, diagnostics, and ignore directives.