docs/current_docs/modules/eslint.mdx
Official module: dagger/eslint
Install with dagger mod install github.com/dagger/eslint.
The ESLint module checks JavaScript and TypeScript source with ESLint.
Use it when the repo already has ESLint config and you want linting to run as a Dagger check.
lint: run ESLint and fail on lint errors.fix: apply ESLint fixes and return corrected source.Install the module, then run its check:
dagger mod install github.com/dagger/eslint
dagger check # run every check in the workspace
dagger check eslint:lint # run ESLint against the workspace source
lint installs dependencies and runs eslint . over the whole workspace using the project's own ESLint configuration, so the result matches what developers see locally.
List the current settings and their values with dagger settings eslint, then set one with dagger settings eslint <key> <value>. Settings are stored in .dagger/config.toml under [modules.eslint.settings].
packageManager (default npm): the package manager used to install dependencies before linting. Set it to yarn or pnpm to match the project, so the same lockfile and dependency versions are used.baseImageAddress (default node:25-alpine): the Node base image ESLint runs in. Pin it to the project's Node version, for example node:22-alpine.[modules.eslint.settings]
packageManager = "pnpm"
baseImageAddress = "node:22-alpine"
ESLint also exposes a fix function that runs eslint . --fix and returns the repaired source as a changeset (excluding node_modules). It is a regular function rather than a check, so it does not run during dagger check; call it with dagger function call (run dagger function list to see available functions).
Use ESLint with Prettier when the project separates lint rules from formatting. Use Biome when the project has moved linting and formatting into one tool.
Source repo: github.com/dagger/eslint