gxmari007 / vite-plugin-eslint

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

Access Environment Variables and Modes #19

Closed skalidindi closed 1 year ago

skalidindi commented 2 years ago

Vite has a system to allow Env Variables. Is there a way for my .eslintrc.js file to access these variables after vite build goes through this plugin?

Basically, I want to turn off some rules for development such as allowing console.log and turn on the rule in production.

gxmari007 commented 1 year ago
eslintPlugin({
    overrideConfigFile: 'your custom eslintrc file'
})

Should be what you want.