Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ npm install --save-dev eslint @eslint/docker

Requires Node.js `^20.19.0 || ^22.13.0 || >=24`. Tested with ESLint v10.

## Syntax tree

The tree format is documented in [docs/syntax-tree.md](https://github.com/eslint/docker/blob/main/docs/syntax-tree.md).
Nodes carry `start`/`end` character offsets instead of `range`/`loc`
properties; use `sourceCode.getRange(node)` and `sourceCode.getLoc(node)`.

The parser is also exported directly:

```js
import { parseDocker } from "@eslint/docker";

const { ast } = parseDocker("FROM node:20-alpine\n");
```

Parsing never fails: the underlying parser is error-tolerant, so malformed
input still produces a tree.

## Development

```bash
Expand Down
Loading