# spell-check

Source: https://apigenie.pl/docs/linter/graphql/rules/spell-check

This rule checks the spelling of descriptions and comments.

## Rule Details

Descriptions are the documentation of a schema. The rule checks them, as Markdown, and the comments of the definitions that can have descriptions, with a built-in English dictionary. Code in backticks, identifiers and URLs are skipped.

## Configuration

The configuration block is an object with the properties:

- `dictionary` and `affix`: the paths of Hunspell dictionary and affix files that replace the
  built-in dictionary; they must be given together
- `words`: extra words, e.g. product names
- `suggestions`: the maximum number of suggestions, from 0 to 10, 3 by default

```yaml
version: "1.0"
commands:
  lint:
    graphql:
      rules:
        spell-check: [warning, { words: [Acme], suggestions: 1 }]
```

The rule can be disabled for a node and everything nested in it with an `# apigenie-lint-disable spell-check` comment on the node, or for a whole file with the comment at the top of the file, separated from the first definition by a blank line. It applies to definitions.

## Examples

**Good**.

```graphql
"The users of the service."
type User { id: ID! }
```

**Bad**. The linter reports `Misspelled word 'sevrice' in description (did you mean 'service'?)`.

```graphql
"The users of the sevrice."
type User { id: ID! }
```
