Registry / testing / vite-plugin-eslint-report

vite-plugin-eslint-report

JSON →
library1.0.1jsnpmunverified

A Vite plugin that runs ESLint checks during build and dev, integrating ESLint reports into the Vite dev server overlay and terminal output. Current stable version is 1.0.1. Release cadence is irregular; the plugin is part of the Alibaba ice framework monorepo but published separately. Key differentiators: lightweight integration with Vite's HMR and build pipeline, supports ESLint caching, custom formatters, and file filtering via include/exclude patterns. Requires ESLint >7.0.0 as a peer dependency. Compared to alternatives like vite-plugin-eslint, it offers a report overlay for dev mode and is maintained under the ice monorepo.

npm install vite-plugin-eslint-report
INSTALL
IMPORT
SIG · VITE-PLUGIN-ESLINT
V
vite-plugin-eslint-report
testingjavascriptv1.0.1
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import eslint from 'vite-plugin-eslint-report'
Default export is the plugin factory function. Use default import for ESM.
default (CommonJS)
✓ const eslint = require('vite-plugin-eslint-report')
Require returns the default factory. Works in CJS environments.
default (TypeScript)
✓ import eslint from 'vite-plugin-eslint-report'
TypeScript typings are included. Use default import with ESM.

Basic setup of vite-plugin-eslint-report with common options: caching, file patterns, and custom config.

// vite.config.js import eslint from 'vite-plugin-eslint-report'; export default { plugins: [ eslint({ ignoreInitial: false, cache: true, include: ['src/**/*.js', 'src/**/*.jsx', 'src/**/*.ts', 'src/**/*.tsx'], exclude: ['node_modules'], formatter: 'stylish', configFile: '.eslintrc.js' }) ] };
Debug
Known issues
gotchaPlugin might not work correctly with ESLint flat config (eslint.config.js) in newer ESLint versions. Ensure you use legacy .eslintrc.* or an alternative.
fix
Use .eslintrc.* config file or check plugin compatibility with flat config.
affects: >=1.0.0
gotchaIn dev mode, ESLint errors may cause HMR updates to be delayed or suppressed. Overlay might not show all errors if HMR is fast.
fix
Set ignoreInitial: true for incremental checks, or rely on terminal output instead of overlay.
affects: >=1.0.0
gotchaThe plugin may not lint files outside the project root. Ensure include paths are relative to project root.
fix
Use 'src/**/*.js' style paths relative to project root.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint'
ESLint is not installed or not listed as a dependency.
fix
npm install eslint --save-dev
TypeError: eslint is not a function
Incorrect import pattern for CommonJS (using require incorrectly).
fix
const eslint = require('vite-plugin-eslint-report').default;
Error: No ESLint configuration found
Missing .eslintrc.* file or configFile option points to a non-existent file.
fix
Create an ESLint config file or set the configFile option to the correct path.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required for linting functionality
Agent activity
20 hits · last 30 days
node
20
Resources
vite-plugin-eslint-report — npm install vite-plugin-eslint-report · libregistry