Integrates ESLint linting into esbuild bundles as a plugin. Current stable version is 0.3.12, requires Node >=18, esbuild >=0.20, and ESLint ^8 || ^9. Provides configurable options like filter, throwOnError, throwOnWarning, and fix. Ships TypeScript types and is actively maintained. Differentiators: lightweight, supports modern ESLint flat config, and works seamlessly with esbuild's onLoad hooks.
npm install esbuild-plugin-eslintVerified import paths — ran on the pinned version, not inferred.
Shows minimal setup using esbuild with the eslint plugin, filtering JS/TS files and throwing on errors.
Upgrade Node to >=18, esbuild to >=0.20, and eslint to ^8 || ^9.
Use import eslint from 'esbuild-plugin-eslint' instead of require().
Rename include to filter; note that filter accepts a RegExp, not a string.
Explicitly set filter to /.*/ to lint all files, or adjust regex to cover desired extensions.
Remove formats option; configure output format via ESLint's --format or formatter options.
npm install esbuild-plugin-eslint eslint --save-dev
Use import eslint from 'esbuild-plugin-eslint'
Ensure you are using import eslint from 'esbuild-plugin-eslint' in an ESM project