Registry / devops / vite-plugin-eslint4b

vite-plugin-eslint4b

JSON →
library0.8.0jsnpmunverified

Vite plugin that allows ESLint to run in the browser by bundling ESLint with browser-compatible polyfills. v0.8.0 supports ESLint 8-10 and Vite >=4, Node >=20. Differentiates from other ESLint plugins by targeting browser environments for linting, not build-time checks. Ships ESM-only, uses rolldown as bundler. Notable for breaking changes: dropped Node 19 support in v0.8.0 and switched to rolldown in v0.6.0. Community-maintained by ota-meshi.

npm install vite-plugin-eslint4b
INSTALL
IMPORT
SIG · VITE-PLUGIN-ESLINT
V
vite-plugin-eslint4b
devopsjavascriptv0.8.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

default
import eslint4b from 'vite-plugin-eslint4b'
const eslint4b = require('vite-plugin-eslint4b')
ESM-only since v0.6.0; require() causes error
default (CommonJS)
import eslint4b from 'vite-plugin-eslint4b'
No CJS support; use ESM import

Basic Vite configuration using vite-plugin-eslint4b to enable ESLint in browser.

// vite.config.ts import type { UserConfig } from 'vite'; import eslint4b from 'vite-plugin-eslint4b'; export default { plugins: [eslint4b()] } as UserConfig;
Debug
Known issues
breakingv0.8.0 drops support for Node.js 19 and older
fix
Upgrade Node.js to version 20 or later
affects: >=0.8.0
breakingv0.6.0 switched bundler from esbuild to rolldown
fix
Ensure compatibility with rolldown; report issues if unexpected behavior occurs
affects: >=0.6.0
breakingv0.5.0 changed cwd path to '/' which may break ESLint rules relying on working directory
fix
Adapt rules to use absolute paths or handle '/' cwd
affects: >=0.5.0
gotchaThis plugin does NOT run ESLint during build; it allows ESLint imports in browser runtime
fix
Use for browser-based linting, not build-time checks
affects: *
Errors
Common errors & fixes
Error: [vite-plugin-eslint4b] Cannot find module 'eslint'
Missing dependency 'eslint'
fix
Install eslint as devDependency: npm install --save-dev eslint
Error: require() of ES Module not supported
Using require() to import the plugin (ESM-only)
fix
Use import statement: import eslint4b from 'vite-plugin-eslint4b'
NodeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature 'node:util' is not available
Running Node.js <20 with plugin version >=0.8.0
fix
Upgrade Node.js to version 20 or later
Upgrade
Version history
0.8.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency for linting functionality
viterequiredpeer dependency for plugin execution
Agent activity
4 hits · last 30 days
node
4
Resources
vite-plugin-eslint4b — npm install vite-plugin-eslint4b · libregistry