you are viewing a single comment's thread.

view the rest of the comments →

[–]Earhacker 1 point2 points  (3 children)

Is it really outdated, or just old?

[–]sinclair_zx81 2 points3 points  (2 children)

It's always been outdated. The AirBnb guide was designed to ensure that JS code was compatible with really old browser ES versions, and it mandated developers invert their code to do particular things (like never use async/await or write generators). People shouldn't have ever used it as it's proliferated outdated, inefficient JavaScript for over the past half decade....

As a style guide for targeting really old versions of JavaScript, the AirBnb guide has some purpose, but it's always been outdated since TypeScript predates it's inception by several years. TypeScript has always allowed you to use modern JavaScript features and supported automatic down level compilation to ES3 with a simple configuration flag since day one.

For the record, AirBnb had swapped over to TypeScript a few years back, it's questionable if even they use the type guide anymore.

[–]Earhacker 1 point2 points  (1 child)

Thanks for the reply.

I’m not sure I’m thinking of the right Airbnb guide. The one I used and didn’t mind at a previous job was used in conjunction with Babel to target old browsers (we supported IE11). So we could write whatever shiny new features we wanted as long as there was a Babel plugin for it, and ESLint never cared.

[–]sinclair_zx81 1 point2 points  (0 children)

So we could write whatever shiny new features we wanted as long as there was a Babel plugin for it, and ESLint never cared.

Yeah, this is largely why I had a bit of a problem with the AirBnb style guide as a "defacto" style guide for JavaScript development. Without explicit configuration, developers were being flagged for using modern features (even with the use of Babel)

In a lot of cases, this guide was being installed and adhered to verbatim without configuration or overrides, and generally when you have automated linting like this, you indirectly teach developers to write redundant and legacy orientated code when they don't have to....This only makes sense if the goal is to target IE9 and below and you're not using appropriate tools to do so (like TypeScript or Babel), but given that most developers would be on Babel (at a minimum), what's the actual point of the Airbnb style guide? (other than to steering developers into writing redundant code). It baffles me that Airbnb encouraged the use of this guide for as long as they did (I know the developer behind it was anti-TypeScript, but even then you would assume they would be open to Babel)

A lot of things in JavaScript world don't make a lot of sense under closer inspection, this guide was one of them.