sveltejs / vite-plugin-svelte

Svelte plugin for http://vitejs.dev/
MIT License
843 stars 103 forks source link

chore(deps): update to eslint v9 #927

Closed dominikg closed 3 months ago

dominikg commented 3 months ago

used the migration tool but had to do a few changes after

The node: false in globals is replaced by a mapped 'off' spread, but that came after the browser spread, disabling shared globals in the process.

todo: remove the FlatCompat helper

dominikg commented 3 months ago

@benmccann does this look ok? esp. the integration of the svelte config? I am a bit surprised that it doesn't setup the ts parser, or does that work ootb now?

dominikg commented 3 months ago

oh, and it having browser and node globals enabled for everything by default is a bit lax too o_O

benmccann commented 3 months ago

I am a bit surprised that it doesn't setup the ts parser, or does that work ootb now?

Svelte and SvelteKit couldn't use it for awhile. It took quite a bit of work, but I just got those enabled recently, so yeah, we could look at moving those to the base config now: https://github.com/sveltejs/eslint-config/issues/37

benmccann commented 3 months ago

oh, and it having browser and node globals enabled for everything by default is a bit lax too o_O

I don't remember how many places we'd need to enable them if they're not enabled globally or how hard that would be too do. We could investigate. As long as we don't make it so annoying that Rich rips out the whole eslint setup out of frustration :laughing:

dominikg commented 3 months ago

yes, finding defaults that work for everyone can be a bit tricky. It's mostly .svelte files where i think it should be only browser globals by default. Maaaybe allow node globals in **.server.** or **/server/**?. For js/ts its a bit more blurry.

Lets discuss this over at the eslint-config repo? (Still getting the hang of eslint v9 config)