Skip to content

Instantly share code, notes, and snippets.

@jkrems
Last active October 13, 2015 17:38
Show Gist options
  • Save jkrems/886b48bd05df2435e952 to your computer and use it in GitHub Desktop.
Save jkrems/886b48bd05df2435e952 to your computer and use it in GitHub Desktop.
(Potential) Groupon Javascript Styles, based on https://github.com/airbnb/javascript
{
// babel-style base rules
"extends": "airbnb/base",
"rules": {
// This allows things like `reduce((a, b) => a + b)`
// Not 100% sure if that's worth the potential cost of badly named identifiers
"id-length": 0
}
}
{
// ES5-style base rules
"extends": "airbnb/legacy",
"rules": {
// This allows things like `reduce(function(a, b) { return a + b; })` and `var _ = require('lodash')`
"id-length": 0,
// With unused/redefine tracking, no need to force vars to be at the top
"vars-on-top": 0,
// In legacy mode, we can't depend on babel to insert `'use strict'` for us
"strict": [2, "global"],
// Without default parameters, things like `options = options || {}` are kind of useful
"no-param-reassign": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment