Hacker GitHub

← All repos

airbnb/javascript

View on GitHub ↗ ★ 148,028 JavaScript

JavaScript Style Guide

82 mentions on Hacker News by 79 people: 27 stories, 55 comments · first 2012-11-05 · latest 2026-01-07

Mentions per year 82 mentions · busiest year 2015 (21)
20082026
  1. …- so that's not really relevant to discuss) Performance isn't important, readability is. ref: https://github.com/airbnb/javascript/issues/1122#issuecommen...
    comment by mattacular · 2026-01-07 · in JavaScript's For-Of Loops Are Fast
  2. No way this is not a satire. https://github.com/airbnb/javascript/issues/1122#issuecommen... https://github.com/airbnb/javascript/issues/1122#issuecommen...
    comment by wiseowise · 2026-01-06 · in JavaScript's For-Of Loops Are Fast
  3. …enough, for-of is not allowed in Airbnb eslint config, and you are expected to use forEach instead: https://github.com/airbnb/javascript/issues/1122 https://github.com/airbnb/javascript/issues/1271 Because the style guide thinks "forEach…
    comment by g947o · 2026-01-06 · in JavaScript's For-Of Loops Are Fast
  4. Ah, eslint-config-airbnb. My favorite airbnb config issues: https://github.com/airbnb/javascript/issues/1271 https://github.com/airbnb/javascript/issues/1122 I literally spent over an hour when adapting an existing project to use the…
    comment by rs186 · 2025-09-08 · in Formatting code should be unnecessary
  5. …these files, I recommend reading this https://claudelog.com/mechanics/claude-md-supremacy . [1] https://github.com/airbnb/javascript [2] https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form
    comment by breadchris · 2025-06-29 · in Share Your CLAUDE.mds
  6. …meant frontend web development. [1] https://eslint.org/blog/2023/10/flat-config-rollout-plans/ [2] https://github.com/airbnb/javascript/issues/2961 [3] https://en.wikipedia.org/wiki/Red_Queen%27s_race
  7. …is actually coming from the airbnb eslint plugin (which AFAIK is quite popular in the JS/TS world: https://github.com/airbnb/javascript/blob/c25bce83be4db06e6a... )
    comment by flohofwoe · 2024-04-21 · in Zig 0.12.0 Release Notes
  8. >Find one large tech corp that still uses master. https://github.com/airbnb/javascript https://github.com/microsoft/vcpkg https://github.com/PowerShell/PowerShell https://github.com/golang/go https://github.com/Netflix/zuul
    comment by Always_Anon · 2023-11-15 · in Did Reddit just denylist all IPs?
  9. …since you won’t spend hours tweaking and selecting new rules. [1] https://standardjs.com/ [2] https://github.com/airbnb/javascript [3] https://github.com/sindresorhus/eslint-plugin-unicorn
    comment by ayuhito · 2023-10-18 · in ESLint: Flat Config Rollout Plan
  10. Link with anchor to recent discussion: https://github.com/airbnb/javascript/pull/255#issuecomment-1...
  11. …all the projects I work on do the proper thing and use spaces ;) React (FB) says they use spaces: https://github.com/airbnb/javascript#whitespace (react links to the airbnb style guide) Google: is usually spaces,…
    comment by greggman3 · 2022-01-11 · in Let's Settle This
  12. …lint preset. A very nice example of an anno 2014-2017 cargo cult that clearly hasn't held up. https://github.com/airbnb/javascript/issues/1271
    comment by graup · 2020-12-08 · in A Modern JavaScript Tutorial
  13. …extensions has lots of other nasty side effects on IDEs, build tools, and browsers (e.g. [1]) [0] https://github.com/airbnb/javascript/pull/985#issuecomment-2... [1] https://bugs.chromium.org/p/chromium/issues/detail?id=659515
  14. …the use of const where a variable is not reassigned, which I've occasionally found handy. [1] https://github.com/airbnb/javascript#references--prefer-cons...
    comment by elyobo · 2019-09-25 · in V8 adds support for top-level await
  15. …akin to gofmt, and adopting standard eslint rules [4] can help too. [1] https://standardjs.com/ [2] https://github.com/airbnb/javascript [3] https://prettier.io/ [4] https://eslint.org/
  16. …examples. While a good read, it's difficult to quickly distinguish between the two. For example: https://github.com/airbnb/javascript
  17. …developer", but they are probably the best spots to see how the development process has changed. https://github.com/airbnb/javascript
  18. …Style Guide, which I found showed a lot of good examples of how to use newer Javascript features: https://github.com/airbnb/javascript
  19. …js is mostly about syntactic patterns. Airbnb has a nice style guide that incorporates most of them https://github.com/airbnb/javascript
  20. …names clash. 2) With point 1 gone, point 2 is wiped out as well. 3) This is patently false. [0] https://github.com/airbnb/javascript#modules--prefer-default...
    comment by hungerstrike · 2017-11-23 · in Why we have banned default exports in JavaScript
  21. …prettier ( https://prettier.io ), and using airbnb's JavaScript Style Guide as a reference point ( https://github.com/airbnb/javascript ), I would enable rules one by one. Then slowly rule by rule (commit by commit) I would clean up the…
  22. …Airbnb's JS styleguide was also very helpful, which showcases best practices and lots of examples. https://github.com/airbnb/javascript
    comment by asar · 2017-10-01 · in Cheatsheet for the modern JavaScript
  23. …some of that info is usable for you, if you have any detail questions, please just comment :) [1]: https://github.com/airbnb/javascript [2]: http://eslint.org/docs/rules/no-new-object.html [3]: https://github.com/prettier/prettier [4]:…
  24. linkies https://github.com/airbnb/javascript https://news.ycombinator.com/item?id=9822975
    comment by skeletonjelly · 2017-07-11 · in ECMAScript 2017 Language Specification
  25. https://github.com/airbnb/javascript
  26. …else, it's just that most developper seem to agree on it and it's familiar to most dev. [0]: https://github.com/airbnb/javascript
  27. …forward to seeing where the community takes it. Congrats to all of the contributors on the 1.0! [1] https://github.com/airbnb/javascript/issues/102
    comment by _harry · 2017-04-13 · in Prettier 1.0
  28. …Rails project and have a reasonable suspicion of where to find a particular piece of code. 1: https://github.com/airbnb/javascript 2: https://twitter.com/hshoff/status/784205839347232768
    comment by sgslo · 2017-04-13 · in Prettier 1.0
  29. …nothing to set this apart from more, if you'll pardon the expression, "standard" options. :) [0]: https://github.com/airbnb/javascript
    comment by Lazare · 2017-04-05 · in StandardJS just turned 10.0.0
  30. …://github.com/assemble/assemble.io/issues/163 https://github.com/braydie/HowToBeAProgrammer/issues/68 https://github.com/airbnb/javascript/pull/698 https://github.com/lighthouse-labs/clock-tower/pull/87…
    comment by waterphone · 2016-09-05 · in Inclusivity Is a Joke
  31. Spaces! https://github.com/airbnb/javascript#whitespace--spaces
    comment by olouv · 2016-05-30 · in Ask HN: Tabs or Spaces?
  32. …common [1] ESLint rule. 1. Admittedly my only data point is AirBnB's style guide / ESLint config: https://github.com/airbnb/javascript#references--prefer-cons...
    comment by tlrobinson · 2016-05-17 · in JavaScript async/await implemented in V8
  33. Airbnb has a decent styleguide - https://github.com/airbnb/javascript "A mostly reasonable approach to js" but style-guides should be just that style guides ...not standards
    comment by tbolt · 2016-04-28 · in Proposed JavaScript Standard Style
  34. …specifies the usage of single quotes for strings (no explanation for the preference though). [1] https://github.com/airbnb/javascript
    comment by sushid · 2016-02-22 · in DuckDuckGo ES6 Cheatsheet
  35. …sure why, but that seems to be the case. It might be due to the ubiquitous AirBnB JS Style guide ( https://github.com/airbnb/javascript ) which enforces single quotes. It's the style guide we use on my team.
    comment by 49531 · 2016-02-22 · in DuckDuckGo ES6 Cheatsheet
  36. The Airbnb styleguide and matching ESLint preset is quite popular and very complete: https://github.com/airbnb/javascript/tree/master/packages/es...
    comment by Ambroos · 2016-02-14 · in Reflections on ESLint's success
  37. …need to present their opinions as the best way to do things. Some useful, widely-cited examples: - https://github.com/airbnb/javascript - http://12factor.net/
    comment by natrius · 2016-01-11 · in How to Name Clojure Functions
  38. …if you could use airbnb's Javascript and React style guides, that is a pretty good standard IMHO https://github.com/airbnb/javascript/tree/master/react
    comment by GiovanniFrigo · 2015-11-16 · in Show HN: A React.js yearly calendar component
  39. Yes: https://github.com/airbnb/javascript
    comment by themichaellai · 2015-10-21 · in Khan Academy's React style guide
  40. …you do need to find a good config, but the airbnb JS style guide comes with a very, very good one: https://github.com/airbnb/javascript
  41. …using ESLint. Airbnb has a premade config that does a pretty good job of providing best practices. https://github.com/airbnb/javascript/tree/master/linters Beware, it's going to flag a whole bunch of stuff in you project, but you'll get…
    comment by madeofpalk · 2015-09-12 · in Redux Blog Example
  42. …their Javascript style guide to ES6. It's a good read on how to write and structure javascript. https://github.com/airbnb/javascript
  43. Isn't this exact rule already in the guide? https://github.com/airbnb/javascript#13.2
    comment by savanaly · 2015-07-03 · in Airbnb JavaScript Style Guide
  44. It looks like they reserve double quotes for JSX attributes: https://github.com/airbnb/javascript/tree/master/react#quote...
    comment by dangle · 2015-07-03 · in Airbnb JavaScript Style Guide
  45. Regarding using single quotes for strings ( https://github.com/airbnb/javascript#6.1 ), I found it interesting that it's one of the rare sections where there's no rationale offered. I guess it's just a stylistic choice in the end, but when…
    comment by elisee · 2015-07-03 · in Airbnb JavaScript Style Guide
  46. ES5 guide - https://github.com/airbnb/javascript/blob/master/es5
    comment by manojlds · 2015-07-03 · in Airbnb JavaScript Style Guide
  47. The best part of this guide is that they included a eslint and jslint rules file. https://github.com/airbnb/javascript/tree/master/linters My team adopted this style guide and was easily able to add it as a eslint step to our existing gulp…
    comment by brwnll · 2015-07-03 · in Airbnb JavaScript Style Guide
  48. Did you even read it? They don't use the meme 'symbols' but clearly mention 'dynamic property names'. https://github.com/airbnb/javascript#3.4
    comment by anustart666 · 2015-07-03 · in Airbnb JavaScript Style Guide
  49. …safe [1][2] is news to me - it feels like they put in air bags and removed the seat belts. [1]: https://github.com/airbnb/javascript#14.1 [2]: http://es-discourse.com/t/why-typeof-is-no-longer-safe/15
    comment by svieira · 2015-07-03 · in Airbnb JavaScript Style Guide
  50. There is also a link on the page to browser compat style guide of es5 https://github.com/airbnb/javascript/tree/master/es5
    comment by ewalk153 · 2015-07-03 · in Airbnb JavaScript Style Guide