> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Linting reference

> How adapter linting works, what tool and rule set are used, and the full list of code style rules adapters must follow.

Adapter linting uses [ESLint](https://eslint.org/) with the AirBnB rule set and two modifications: the max line length rule is downgraded to a warning, and the `comma-dangle` rule is removed so that JSON files are formatted as valid JSON.

Linting scripts are defined in `package.json`. Run them from the adapter directory.

```bash
npm run lint          # all lint output, including warnings
npm run lint:errors   # errors only — suppresses warnings
```

Most adapters produce a large number of warnings. Running `lint:errors` makes it easier to find the issues that matter. Lint errors — especially syntax errors — can prevent the adapter from loading whenItential Platform restarts and can cause runtime failures. See [Linting](/adapters/test/test-and-lint-adapters) for guidance on when to run lint and what to do with errors.

## Code style rules

| #  | Rule                                                        | Example                                       |
| -- | ----------------------------------------------------------- | --------------------------------------------- |
| 1  | Indentation must be 2 spaces.                               |                                               |
| 2  | Use single quotes for strings. No double quotes.            | `'I am a string'`                             |
| 3  | Use template literals when embedding variables in strings.  | `` `this adds a ${variable} into a string` `` |
| 4  | Do not quote object keys.                                   | `{ key: 'value' }`                            |
| 5  | Use dot notation for object property access.                | `object.key`                                  |
| 6  | Use bracket notation when a key contains a hyphen.          | `object['my-key']`                            |
| 7  | Do not use `++` or `--`. Use `+=` or `-=` instead.          | `x += 1`                                      |
| 8  | Place a space after commas.                                 |                                               |
| 9  | Place a space before curly braces on functions and objects. |                                               |
| 10 | Place `else` on the same line as the closing `}` of `if`.   |                                               |
| 11 | Place `catch` on the same line as the closing `}` of `try`. |                                               |
| 12 | No trailing spaces at the end of lines.                     |                                               |