5 ms·
I would recommend linters (ESLint) to beginners as I use it as a long time not-beginner to point out silly mistakes, which can be the hardest and most frustrati
by superfamicom 6y ago
I would recommend linters (ESLint) to beginners as I use it as a long time not-beginner to point out silly mistakes, which can be the hardest and most frustrating to spot.
> [T]hey’re as useful to learn coding as it is to use ready-to-heat-up dough and buns to become a baker.
I would imagine getting a familiarity with a new oven would be a good use for a new baker experimenting with ready to bake items.
I get the feeling the author is into a very brutal style of learning that might resonate with some, but probably not most with their steps.
This is from 2018 and updated last in 2019, but the title didn't show that.
- gosukiwi 6y agoI was gonna point out the same. Linters are great, for newbies and professionals alike. If you don't like a rule you can change it. I'd say: As a newby, just don't change any rule and use standard settings.
- deleted 6y ago[deleted]
- prashnts 6y agoI constantly need to add a couple of exceptions to the defaults though. And only because it's pretty weird syntax to let you get the block level meaning become obvious for a small part of the otherwise current standards we are using. (Whenever the indentation fights settle down...) Couple of constants look good together if you look at their semantics, but the rest turns into a mess!
- xmprt 6y agoI remember adding a linter to a relatively large project that I was working on after a few months and then realizing how many errors there were that I was surprised the project even worked in some cases (it probably didn't but I never bothered testing those edge cases).
- jrumbut 6y agoPlenty of projects that are actually fine blow up linters. If you to want to add a linter you can either add one rule at a time or make it part of your process that the number of warnings goes down with every merge.
- xmprt 6y agoIn that project it was about 100 or so errors that were all really easy to fix (no major refactoring required) so I just sat down and went through the list one by one until I had 0 errors, 0 warnings. A lot of the errors were just styling. Some were errors where the value could have been null/forgot a try-catch block (although almost never was in practice unless I changed some code elsewhere accidentally), and a few were so major that one of the features that I implemented wasn't working at all but I never realized (mostly because I was one of the few people using the app and never really tested the feature).
- z3t4 6y agoI do not recommend using a linter in beginner or small-team projects. Instead of spending hours and hours switching between white space conventions, that time is better spent testing the web/app in different browsers, not just Chrome and Firefox, but also mobile and embedded browsers, and less known browsers like Dillo and Konqueror.
- winrid 6y agoThere is no reason to spend time on it. Pick a standard, create some shared editor config files or have the linter fix the code as part of the build (like gofmt).