vite-plugin-eslint
vite-plugin-eslint copied to clipboard
Does not work with Svelte
trafficstars
I'm trying to use this with Svelte Kit by passing it to the vite plugins objects in svelte.config.js:
import adapter from '@sveltejs/adapter-auto';
import preprocess from 'svelte-preprocess';
import eslintPlugin from 'vite-plugin-eslint';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter(),
vite: () => ({
plugins: [
eslintPlugin.default() // eslintPlugin() resulted in "not a function" error
]
})
},
preprocess: preprocess({
scss: {
prependData: `@import './src/scss/global.scss';`
}
})
};
export default config;
When I run npm run dev and continue my development I never see any linting errors in the terminal. I assume this is how I am supposed to be seeing the linting errors, correct?
If I manually run eslint from the command line I see all my lint errors as expected.
It should work fine now.