esbuild-plugin-linter v0.0.2
esbuild-plugin-linter
Nicely integrates the most recent version of eslint into an esbuild plugin.
How
yarn add esbuild-plugin-linter --devconst { build } = require('esbuild');
const eslint = require('esbuild-plugin-linter');
build({
// ...
plugins: [
eslint({ /* config */ })
]
})Config
This plugin respects your ESLint configuration as per default. It also takes a configuration object intended for the ESLint constructor with the addition of a filter property. The most important options are:
filter
Type: RegExp
Default: /\.(jsx?|tsx?|vue|svelte)$/
Used by: esbuild
Reference: esbuild.github.io
Instructs esbuild what files to look at. Only files matching this pattern will be looked at.
fix
Type: boolean
Default: false
Used by: eslint
Reference: eslint.org (options.fix)
Controls whether to enable or disable the autofix feature of ESLint.
useEslintrc
Type: boolean
Default: true
Used by: eslint
Reference: eslint.org (options.useEslintrc)
If set to false, ESLint will not respect any configuration files it finds.
License
MIT