Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint

A Dagger toolchain — written in the .dang module language — that lints your project with ESLint, using your project's own ESLint configuration and version.

Functions

Function Description
lint Lint the source (a @check).
fix Fix linting issues; returns the changes as a Changeset.

Usage

Install the module in your workspace:

dagger install github.com/dagger/eslint

Run the lint check:

dagger check              # run every check in the workspace
dagger check eslint:lint  # just the ESLint check

Fix linting issues — returns a changeset; approve it to apply the fixes to your workspace (or pass -y to auto-apply):

dagger api call eslint fix

Working directory awareness

Functions run from your current working directory within the workspace. The whole workspace is mounted — so shared configuration like a root .eslintrc.* or eslint.config.* still resolves — but ESLint itself runs from the directory you invoke dagger from. Run from the workspace root to cover everything, or from a subdirectory to scope lint and fix to that subtree.

If the workspace root holds no package.json, the dependency install is skipped and npx fetches ESLint on demand — a standalone eslint config works without a Node project.

Customization

The toolchain can be customized in your dagger.json to meet your needs:

{
  "name": "my-module",
  "engineVersion": "...",
  "toolchains": [
    {
      "name": "eslint",
      "source": "github.com/dagger/eslint@main",
      "pin": "...",
      "customizations": [
        {
          "argument": "baseImageAddress",
          "default": "node:22"       # default: node:25-alpine; use any container image
        },
        {
          "argument": "packageManager",
          "default": "yarn"          # default: npm; alternatively use yarn, pnpm, or bun
        }
      ]
    }
  ]
}

About

A Dagger toolchain for eslint - a static code analyzer for Javascript

Resources

Code of conduct

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors