@thedanbob/esbuild-plugin-eslint
v1.0.0
Published
Lint your esbuild bundles with ESLint.
Downloads
45
Maintainers
Readme
esbuild-plugin-eslint
Nicely integrates the most recent version of eslint into an esbuild plugin.
How
npm i esbuild-plugin-eslint eslint --save-devimport { build } from 'esbuild';
import eslint from 'esbuild-plugin-eslint';
await build({
// ...
plugins: [
eslint({ /* config */ })
]
});node esbuild.config.jsConfig
This plugin respects your ESLint configuration by default. Available config options are:
filter
Type: RegExp
Default: /\.(?:jsx?|tsx?|mts|cts|mjs|cjs|vue|svelte)$/
Used by: esbuild
Reference: esbuild.github.io
Tells esbuild what files to look at. Only files matching this pattern will be handled by the plugin.
throwOnError
Type: boolean
Default: false
Used by: The plugin itself
Instructs the plugin to forward errors found by ESLint to esbuild and throw an error.
throwOnWarning
Type: boolean
Default: false
Used by: The plugin itself
Instructs the plugin to forward warnings found by ESLint to esbuild and throw an error.
eslint
Type: ESLint.Options
Default: {}
Used by: eslint
Reference: eslint.org
Options object passed to the ESLint constructor.
Attribution
Forked from the original plugin by Robin Löffel.
License
MIT
