DEV Community

Discussion on: 5 outcomes from building a Chrome extension with Svelte

Collapse
 
isaachagoel profile image
Isaac Hagoel

Thanks for the write-up. I wonder, why is eslint needed with Svelte? The compiler seems to be pretty good at complaining about undeclared variables and such.

Collapse
 
alvechy profile image
Alex Vechy

Thanks you

Good point. As you stated, compiler is good at complaining on unused or undeclared variables + it has good style lint as well, so you won't have unused or misspelled classes in CSS. And I should have mentioned that. But eslint is more than just that, it enables consistent code (style can be forced with prettier, but return statements, variable declarations and style, etc). Also, I have just .js files in my project that aren't checked by Svelte compiler.

Collapse
 
isaachagoel profile image
Isaac Hagoel

Ah, I didn't know js files aren't compiled. I thought it processes them so that it can do its treeshaking magic and all.
On the one hand your points make a lot of sense to me and I can relate. On the other hand I wonder whether we (devs) became too spoiled for our own good. We seem to prioritise DX over UX and expect to be hand held (by our free tools and the communities that back them) every step of the way