gxmari007 / vite-plugin-eslint

🚨 ESLint plugin for vite
MIT License
266 stars 44 forks source link

vite build failed with vite-plugin-eslint 1.8.0 #37

Closed aguegu closed 1 year ago

aguegu commented 1 year ago

failure in npm run build (vite build)

[commonjs--resolver] Cannot read config file: ***********************/node_modules/@css-render/vue3-ssr/.eslintrc.js
Error: Cannot find module '@rushstack/eslint-config/patch/modern-module-resolution'

even after @rushstack/eslint-config installed, the error would be

[commonjs--resolver] Failed to load config "@css-render/eslint-config/base" to extend from.
Referenced from:***********************/node_modules/@css-render/vue3-ssr/.eslintrc.js

rolling back to 1.7.0 would just work fine.

nevil2 commented 1 year ago

I have same issue with a different package: ERROR [vite-plugin-eslint] Failed to load plugin 'prettier' declared in 'node_modules/@vue-leaflet/vue-leaflet/package.json': Cannot find module 'eslint-plugin-prettier' Rolled back to 1.7.0

mikouaji commented 1 year ago

I have a similar issue with a different package

[error] [commonjs--resolver] Failed to load config "./.config/eslint.config" to extend from.
Referenced from: ***/node_modules/tippy.js/package.json
file: ***/node_modules/tippy.js/dist/tippy.esm.js

Also rolled back to 1.7.0

Aslam97 commented 1 year ago

I have same issue. fix by replacing include value

plugins: [
   eslint({ include: '/.(js|vue)$/' })
]
gxmari007 commented 1 year ago

include and exclude option types are now restricted to string or string[]

tfonfara commented 1 year ago

I can confirm the bugfix 👍