New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-plugin-eslint

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-eslint

Lint your esbuild bundles with ESLint. 🧐

0.3.12
latest
Source
npm
Version published
Weekly downloads
6.3K
8.78%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

esbuild

FAQs

Package last updated on 15 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts