esbuild-plugin-eslinter
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

esbuild-plugin-eslinter

npm version

Description

esbuild plugin for integrating your ESLint rules into your build process. Automatically skips linting node_modules and caches the results for optimal rebuilds when watching.

Installing

// with npm
npm i -D esbuild-plugin-eslinter

// with yarn
yarn add -D esbuild-plugin-eslinter

PreReqs

  1. Install peer dependencies (yarn add -D eslint esbuild)
  2. Create your .eslintrc file (yarn eslint --init)

Example

import { build } from "esbuild"
import { eslintPlugin } from "esbuild-plugin-eslinter"

build({
  entryPoints: ["src/components/index.tsx"],
  bundle: true
  outfile: "dist/bundle.js",
  target: "es2020",
  plugins: [eslintPlugin({ persistLintIssues: true })],
}).then(() => {
  console.log("Build Complete")
})

Config

interface Config {
  persistLintIssues?: boolean
}

Development Notes

  • Compile the TypeScript with yarn build
  • "Test" the project with yarn test (runs a test esbuild in the console)

Dependencies (0)

    Dev Dependencies (9)

    Package Sidebar

    Install

    npm i esbuild-plugin-eslinter

    Weekly Downloads

    6

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    5.26 kB

    Total Files

    5

    Last publish

    Collaborators

    • turtlesocks