0.3.12 • Published 2 months ago

esbuild-plugin-eslint v0.3.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

esbuild-plugin-eslint

latest version on npm npm downloads a week required node version esbuild peer dep eslint peer dep package license

Lint your esbuild bundles with eslint. 🧐

Nicely integrates the most recent version of eslint into an esbuild plugin.

How

npm i esbuild-plugin-eslint eslint --save-dev
import { build } from 'esbuild';
import eslint from 'esbuild-plugin-eslint';

await build({
  // ...
  plugins: [
    eslint({ /* config */ })
  ]
});
node esbuild.config.js

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, throwOnError, and throwOnWarning property. The most important 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.

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

0.3.12

2 months ago

0.3.11

2 months ago

0.3.10

2 months ago

0.3.9

2 months ago

0.3.8

2 months ago

0.3.7

6 months ago

0.3.0

1 year ago

0.2.0

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.1.0

2 years ago

0.1.1

2 years ago

0.0.1

2 years ago