unplugin-eslint
v0.2.0
Published
A universal bundler plugin to lint entry points and all imported files with ESLint.
Downloads
5
Maintainers
Readme
unplugin-eslint
🍣 A universal bundler plugin to lint entry points and all imported files with ESLint.
Template Usage
To use this template, clone it down using:
npx degit unplugin/unplugin-eslint my-unplugin
And do a global replacement of unplugin-eslint
with your plugin name.
Then you can start developing your unplugin 🔥
To test your plugin, run: pnpm run dev
To release a new version, run: pnpm run release
Install
npm i --save-dev unplugin-eslint
// vite.config.ts
import UnpluginEslint from 'unplugin-eslint/vite'
export default defineConfig({
plugins: [
UnpluginEslint({
/* options */
}),
],
})
Example: playground/
// rollup.config.js
import UnpluginEslint from 'unplugin-eslint/rollup'
export default {
plugins: [
UnpluginEslint({
/* options */
}),
],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-eslint/webpack')({
/* options */
}),
],
}
// nuxt.config.js
export default defineNuxtConfig({
modules: [
[
'unplugin-eslint/nuxt',
{
/* options */
},
],
],
})
This module works for both Nuxt 2 and Nuxt Vite
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-eslint/webpack')({
/* options */
}),
],
},
}
// esbuild.config.js
import { build } from 'esbuild'
import UnpluginEslint from 'unplugin-eslint/esbuild'
build({
plugins: [UnpluginEslint()],
})
Usage
Options
For all options please refer to docs.
This plugin accepts all @rollup/plugin-eslint options.