You might be expecting a long rant on why code style matters and tabs are sinful in your JavaScript code. This isn't that, thankfully.
If you've been snooping around ★★REDACTED★★★, you may have noticed that, in contrast to our other projects, it uses 2 spaces for indentation instead of 4. This was a decision Eden, Lauren, and I made, given that we kind of just started out that way, and that two-tab indentation makes our somewhat absurd functional chains easier on the eyes and the widths.
This also allows us to say that we simply use the Airbnb code style rather than saying we use it with a carveout as we've written for mapbox.js and iD.
This isn't an announcement that we're switching to 2 spaces, but rather a statement of how we treat code style and deal with these differences:
Try to be consistent so that reading your code is like reading a novel, not a weird postmodern art novel.
Just like this fun stock image, don't ever wear shorts like that and especially not at weddings.
Things can help you with this:
- editorconfig is a dotfile you add to projects to automatically configure editors. It's like modelines but cross-editor-compatible (install it in your sublime or vim or whatever) and not nearly as noisy and annoying
- vim-sleuth and auto-detect-indentation for atom and sublime tries to do this by default.
For this reason we don't pester people to convert all their tabs to spaces or vice versa or whatever on projects that work pretty darn well already.
tl;dr: the 'mapbox code style' won't come as an order from high or even be 'the mapbox code style', but it's important to choose one for your projects, follow the 'when in rome' rule, and make sure projects are internally consistent.