{"id":22655,"library":"vite-plugin-eslint-report","title":"vite-plugin-eslint-report","description":"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.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/alibaba/ice/tree/master/packages/vite-plugin-eslint-report","tags":["javascript"],"install":[{"cmd":"npm install vite-plugin-eslint-report","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-eslint-report","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-eslint-report","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for linting functionality","package":"eslint","optional":false}],"imports":[{"note":"Default export is the plugin factory function. Use default import for ESM.","symbol":"default","correct":"import eslint from 'vite-plugin-eslint-report'"},{"note":"Require returns the default factory. Works in CJS environments.","symbol":"default (CommonJS)","correct":"const eslint = require('vite-plugin-eslint-report')"},{"note":"TypeScript typings are included. Use default import with ESM.","symbol":"default (TypeScript)","correct":"import eslint from 'vite-plugin-eslint-report'"}],"quickstart":{"code":"// vite.config.js\nimport eslint from 'vite-plugin-eslint-report';\n\nexport default {\n  plugins: [\n    eslint({\n      ignoreInitial: false,\n      cache: true,\n      include: ['src/**/*.js', 'src/**/*.jsx', 'src/**/*.ts', 'src/**/*.tsx'],\n      exclude: ['node_modules'],\n      formatter: 'stylish',\n      configFile: '.eslintrc.js'\n    })\n  ]\n};","lang":"javascript","description":"Basic setup of vite-plugin-eslint-report with common options: caching, file patterns, and custom config."},"warnings":[{"fix":"Use .eslintrc.* config file or check plugin compatibility with flat config.","message":"Plugin might not work correctly with ESLint flat config (eslint.config.js) in newer ESLint versions. Ensure you use legacy .eslintrc.* or an alternative.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set ignoreInitial: true for incremental checks, or rely on terminal output instead of overlay.","message":"In dev mode, ESLint errors may cause HMR updates to be delayed or suppressed. Overlay might not show all errors if HMR is fast.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use 'src/**/*.js' style paths relative to project root.","message":"The plugin may not lint files outside the project root. Ensure include paths are relative to project root.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"npm install eslint --save-dev","cause":"ESLint is not installed or not listed as a dependency.","error":"Error: Cannot find module 'eslint'"},{"fix":"const eslint = require('vite-plugin-eslint-report').default;","cause":"Incorrect import pattern for CommonJS (using require incorrectly).","error":"TypeError: eslint is not a function"},{"fix":"Create an ESLint config file or set the configFile option to the correct path.","cause":"Missing .eslintrc.* file or configFile option points to a non-existent file.","error":"Error: No ESLint configuration found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}