#JavaScript developers, do you think #ESLint should be a part of the build process?
I've seen quite a few projects use #Webpack and #Vite plugins to run ESLint during their build process. This both shows a huge error overlay when there are linting errors, and halts the build when building for production.
However, I never understood that, as linting does not really ensure validity of the code, but rather that it aligns to some stylistic rules.
To expand on the above, while #ESLint may prevent some errors (e.g. missed React dependency or such), it usually doesn't ensure that your code is valid and ready to run. Therefore, I think ESLint, just like #Prettier, should be only present as a plugin in your IDE and separate script in a package.
I would even go as far as to say that ESLint during the build is harmful and slows you down, as it can error for silly things like spaces, that do not affect the result of your code whatsoever.
Hey @astro, I tried running a brand new Astro project with #npm but there seems to be an issue when installing the dependencies?
When running "npm run dev" it cannot find the "astro" command. When installing it with #yarn everything works fine and as expected (no error during dependency install). 🤷♂️
@astro Also #prettier doesn't recognize Astro files anymore when using #VisualStudioCode? Tested it with a version 2 Astro project and it works as expected...
Someone on Twitter that I respect made the insinuation that I'm a bigot for preferring single quotes in my #Prettier config...
The argument is that the majority of all programming languages don't support single quotes, and if you personally don't have an opinion (setting aside the fact that I do have a preference), you should consider the opions of others.
I can admit when I haven't thought through something and need to change my stance, but this was a bit bizarre. Thought?
@marcamos@pepelsbey just curious, what don't you like about it? I find it quite good, and I like the way it splits tags to put every attribute on its own line (= better git diffs) and to conserve spaces / the lack thereof. The only problem I have with #Prettier (across all languages) is the fact that it collapses the multi-line structures if there is space, which I almost never want.