unplugin-eslint
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

unplugin-eslint

NPM version

🍣 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
// vite.config.ts
import UnpluginEslint from 'unplugin-eslint/vite'

export default defineConfig({
  plugins: [
    UnpluginEslint({
      /* options */
    }),
  ],
})

Example: playground/


Rollup
// rollup.config.js
import UnpluginEslint from 'unplugin-eslint/rollup'

export default {
  plugins: [
    UnpluginEslint({
      /* options */
    }),
  ],
}


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-eslint/webpack')({
      /* options */
    }),
  ],
}


Nuxt
// nuxt.config.js
export default defineNuxtConfig({
  modules: [
    [
      'unplugin-eslint/nuxt',
      {
        /* options */
      },
    ],
  ],
})

This module works for both Nuxt 2 and Nuxt Vite


Vue CLI
// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-eslint/webpack')({
        /* options */
      }),
    ],
  },
}


esbuild
// 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.

Package Sidebar

Install

npm i unplugin-eslint

Weekly Downloads

6

Version

0.2.0

License

MIT

Unpacked Size

7.58 MB

Total Files

45

Last publish

Collaborators

  • wzc520pyfm