Write Perfect Code with Standard and ESLint

preview_player
Показать описание
In this talk, Feross Aboukhadijeh explains about code linting – how to use Standard and ESLint to catch programmer errors before they cause problems for your users. We'll discuss how to get started with linting, as well as how to improve your setup if you're already linting your code.

The global dev community meets at WeAreDevelopers, an event dubbed by many as the “Woodstock of Developers”. The WeAreDevelopers World Congress 2018 brought together 8,000 techies from 70 countries for 72-hours of pure dev-fun.

Visit the largest developer playground in Europe!

#WeAreDevs

©2018, WeAreDevelopers
Рекомендации по теме
Комментарии
Автор

Regarding the question of tabs or spaces, editorconfig is the answer. Setup it properly per project, that's all, after that you do not care if you have tabs or spaces.

rumax
Автор

I doubt perfect code and anything related to javascript belong in the same sentance.

NightmareCrab
Автор

Great library, terrible idea naming it "Standard" JS...Don't get me wrong, it has a ton of fantastic rules going for it, but the no-semicolons rule is just an accident waiting to happen, and overall harms beginners looking for a good, bulletproof coding style guide. Not to mention that for a "standard", it's not really a widely adopted one at all (most developers use semi-colons for this exact reason).

So much potential wasted by an awkward name :/

sergeigarcia
Автор

So javascript is confusing and is not shipped with a compiler, so now we need a 3rd party implementation of a syntax checker in the form of linters. Wow. Progress.

MrOboema
Автор

9:35 first off that's not a "bug" that's just stupid code. Secondly if that was present in any actual reasonable code it would break tests, or get caught by some other instance of testing if you're not writing actual tests.

Linters are just glorified style keepers written by people with a lot of "opinion" and bias and little expertise. They're useful for keeping the style, they're not very useful otherwise. The things linters catch are things that should just be basic "can you actually think straight?" questions on a interview. If they cant pass that then you have bigger problems on your hand. Worry not about the so called bugs you speak of and more about how your codebase will be turning into fizzbuzz industries soon enough.

srcspider
Автор

Spaces and single quotes... i'm out

musicaldustbin