{"id":22656,"library":"vite-plugin-eslint4b","title":"vite-plugin-eslint4b","description":"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.","status":"active","version":"0.8.0","language":"javascript","source_language":"en","source_url":"https://github.com/ota-meshi/vite-plugin-eslint4b","tags":["javascript","eslint","vite","browser"],"install":[{"cmd":"npm install vite-plugin-eslint4b","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-eslint4b","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-eslint4b","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for linting functionality","package":"eslint","optional":false},{"reason":"peer dependency for plugin execution","package":"vite","optional":false}],"imports":[{"note":"ESM-only since v0.6.0; require() causes error","wrong":"const eslint4b = require('vite-plugin-eslint4b')","symbol":"default","correct":"import eslint4b from 'vite-plugin-eslint4b'"},{"note":"No CJS support; use ESM import","wrong":"","symbol":"default (CommonJS)","correct":"import eslint4b from 'vite-plugin-eslint4b'"}],"quickstart":{"code":"// vite.config.ts\nimport type { UserConfig } from 'vite';\nimport eslint4b from 'vite-plugin-eslint4b';\n\nexport default {\n  plugins: [eslint4b()]\n} as UserConfig;","lang":"typescript","description":"Basic Vite configuration using vite-plugin-eslint4b to enable ESLint in browser."},"warnings":[{"fix":"Upgrade Node.js to version 20 or later","message":"v0.8.0 drops support for Node.js 19 and older","severity":"breaking","affected_versions":">=0.8.0"},{"fix":"Ensure compatibility with rolldown; report issues if unexpected behavior occurs","message":"v0.6.0 switched bundler from esbuild to rolldown","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"Adapt rules to use absolute paths or handle '/' cwd","message":"v0.5.0 changed cwd path to '/' which may break ESLint rules relying on working directory","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Use for browser-based linting, not build-time checks","message":"This plugin does NOT run ESLint during build; it allows ESLint imports in browser runtime","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install eslint as devDependency: npm install --save-dev eslint","cause":"Missing dependency 'eslint'","error":"Error: [vite-plugin-eslint4b] Cannot find module 'eslint'"},{"fix":"Use import statement: import eslint4b from 'vite-plugin-eslint4b'","cause":"Using require() to import the plugin (ESM-only)","error":"Error: require() of ES Module not supported"},{"fix":"Upgrade Node.js to version 20 or later","cause":"Running Node.js <20 with plugin version >=0.8.0","error":"NodeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature 'node:util' is not available"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}