Giter Site home page Giter Site logo

james-yeoman / esbuild-plugin-eslint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robinloeffel/esbuild-plugin-eslint

0.0 0.0 0.0 266 KB

Lint your esbuild bundles with eslint. ๐Ÿง

Home Page: https://npmjs.com/esbuild-plugin-eslint

License: MIT License

JavaScript 38.04% TypeScript 61.96%

esbuild-plugin-eslint's Introduction

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

esbuild-plugin-eslint's People

Contributors

robinloeffel avatar travisbernard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.