ESLint
Official module: dagger/eslint
Install with dagger mod install github.com/dagger/eslint.
What It Is​
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.
Use It For​
- Catch code issues before a PR lands.
- Run the same lint check locally and in CI.
- Produce a repair workflow for fixable lint issues.
Main Workflows​
lint: run ESLint and fail on lint errors.fix: apply ESLint fixes and return corrected source.
How to Use It​
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.
Settings​
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(defaultnpm): the package manager used to install dependencies before linting. Set it toyarnorpnpmto match the project, so the same lockfile and dependency versions are used.baseImageAddress(defaultnode:25-alpine): the Node base image ESLint runs in. Pin it to the project's Node version, for examplenode:22-alpine.
[modules.eslint.settings]
packageManager = "pnpm"
baseImageAddress = "node:22-alpine"
Fixing issues​
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).
Workspace Fit​
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​
Source repo: github.com/dagger/eslint