esbuild plugin for integrating eslint with built in caching and node_module skipping
npm install esbuild-plugin-eslinter
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.
``markdown
// with npm
npm i -D esbuild-plugin-eslinter
// with yarn
yarn add -D esbuild-plugin-eslinter
`
1. Install peer dependencies (yarn add -D eslint esbuild).eslintrc
2. Create your file (yarn eslint --init)
`ts
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")
})
`
`typescript`
interface Config {
persistLintIssues?: boolean
}
- Compile the TypeScript with yarn buildyarn test` (runs a test esbuild in the console)
- "Test" the project with