gxmari007 / vite-plugin-eslint

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

Default exclude path doesnt seem to work sometimes #40

Closed brense closed 1 year ago

brense commented 1 year ago

Hello! I discovered recently that there's an issue when building a project that includes @popperjs I got an error:

Error: Failed to load config "./.config/eslint.config" to extend from.

That I eventually tracked down to vite-plugin-eslint... When I changed my vite config from:

import eslint from 'vite-plugin-eslint'

export default defineConfig({
  ...otherConfig,
  plugins: [...otherPlugins, eslint()]
})

To this:

import eslint from 'vite-plugin-eslint'

export default defineConfig({
  ...otherConfig,
  plugins: [...otherPlugins, eslint({
    exclude: ['**/node_modules/**']
  })]
})

The build worked fine!

Not sure if the same issue exsists for other packages besides @popperjs. Here's the original comment on the @popperjs github: https://github.com/floating-ui/floating-ui/issues/1485#issuecomment-1217502942

gxmari007 commented 1 year ago

v1.8.1 has fixed.🙂

brense commented 1 year ago

Tested, works for my use-case! Thank you kindly sir!