News for hackers. Stuff that matters.
Re:GitHub Super Linter: one linter to rule them all by lowercased on Thursday June 18, 2020 @05:12PM (#23568099)
> What do you dislike about bugs being highlighted as you type

many things "highlighted as you type" aren't "bugs".

    let greeting = "Hello " + user.name;
Auto-fixing immediately flags this with "DAMN YOU USE A CONST!!!!" (multiple red squiggles that I have to hover and review).

but... I might be making a change to it a few minutes later... but I've got some damn visual shit flashing in my eyes that "USE A CONST"

concat strings? PREFER TEMPLATE!!!

OK, ESlint, have it your way, please auto-correct that...

    `Hello ${  user.name}`;
WTF?

And... this is just one set of 'best practices' to learn - change per language/framework/team multiple times (sometimes in the same week) and it's... difficult.

Yes, I'm an old-fogey. I have close to 30 years of muscle memory of using string concat and double quotes. "auto-fixing as I type" brings a huge interruption of flow, and THESE ARE NOT BUGS. They are style choices someone else is imposing on me. It doesn't make the code less buggy. It doesn't make the client any happier. If someone else coming in to the code is genuinely confused, confounded or severely impeded by

   let greeting = "Hello " + user.name;
to the point where they have trouble deciphering the work, perhaps they're not terribly good at their job?

Goodness help folks when new management comes in and demands a new 'better' style.

Re:GitHub Super Linter: one linter to rule them all by Vinnl on Friday June 19, 2020 @02:07AM (#23571494)
So the problem is having rules enabled that do not help prevent bugs. Actually running ESLint for the first time will ask you if you just want to check for bugs or also enforce some code style. The former is preselected, and would not shout at you for not using `const` or template strings.

I'd always argue for using it that way, which is very reasonable to me.

(A bit weird to have 30 years of muscle memory writing `let`, btw :) )

Re:GitHub Super Linter: one linter to rule them all by Izkata on Thursday June 18, 2020 @11:42PM (#23570729)
The funniest part about that particular example is that it's highly likely you're using babel to support old browsers, and the compiled version just switches it back to string concatenation.
Re:GitHub Super Linter: one linter to rule them all by lowercased on Friday June 19, 2020 @06:34AM (#23573039)
In the example above, I believe that's the case.

Again, an issue with switching between projects/styles, for me - one client/project insists on "const" in JS. Another client/project is supporting a product on IE9 for a client of theirs, but doesn't use any build tool for some of that JS, so we're not even supposed to use "let" or anything else "new" for some of that project. Mentally switching between those two worlds is like jumping between 2019 and 2009 every few days.

Realistically, could we introduce a transpiler? Technically yes, but operationally? It's a Frankenstein project that has so many larger issues that's low on the list for people (sections of the functionality are being migrated over to react altogether, and throwing 'more tools' in to the mix on legacy stuff is not desired).