eslint-config-groupon
ESLint configuration used by Groupon
Last updated 2 months ago by groupon .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-config-groupon 
SYNC missed versions from official npm registry.

JavaScript at Groupon

This repository contains tools & guidelines for using JavaScript at Groupon. It represents the best effort to capture the current practices.

Writing NPM Packages

ES5 or ES2015?

The default lint style should be groupon/nodeN (e.g. groupon/node4), depending on which node version is the minimal version targeted.

For client-side code we depend on babel-preset-env to ensure that both application- and library code is compiled down to whatever our targeted browsers support.

Versioning and Publishing

We use nlm to manage our libraries. This ensures that:

  1. Every library has a usable CHANGELOG.md file as part of its git history.
  2. Releases are never tied to a single person.
  3. We can easily share best practices across projects.

Groupon JavaScript Style Guide

Fortunately there already is a great and well-documented style guide for JavaScript over at airbnb/javascript. It definitely is worth a read and in many ways we're staying fairly close to it.

There's some important differences that are mostly around our focus on sticking to features natively supported by Node where possible, and a higher bar for rules that don't support --fix: If a rule isn't clearly preventing bugs, it has to support --fix to be enabled.

Additionally, our file naming convention is kabab-case. File names should be entirely in lowercase to avoid any renaming issues with file systems.

Regarding code organization, we generally structure code by domain, not by layer (todos/model.js instead of models/todo.js).

To ensure good automation support, we're also dropping any rules that conflict with prettier's formatting.

The Longer Answer

We split our rules into three categories:

  • Mistakes: Things that should only appear because the developer made a mistake, 99% of the time. If these errors aren't fixed, we wouldn't expect the program to work correctly. This is the only category where we allow "error" even for rules that don't support --fix.
  • Conventions: Points out patterns that we believe could lead to confusion or maintenance issues down the line. If a rule isn't fixable, there should be a high bar for it to be enabled to not cause noise. Even if a rule is enabled, it may at most warn.
  • Opinions: Things that are arbitrary choices. Most whitespace and formatting rules fall into this category. Everything in here must support --fix and shouldn't require human intervention.

Groupon CoffeeScript Style Guide

We include a single coffeelint config module - it allows globals appropriate for ES6, Mocha, and Node coding.

Current Tags

  • 10.0.0                                ...           latest (2 months ago)

32 Versions

  • 10.0.0                                ...           2 months ago
  • 9.0.0                                ...           3 months ago
  • 8.1.1                                ...           4 months ago
  • 8.1.0                                ...           5 months ago
  • 8.0.1                                ...           8 months ago
  • 8.0.0                                ...           8 months ago
  • 7.2.1                                ...           a year ago
  • 7.2.0                                ...           a year ago
  • 7.1.0                                ...           2 years ago
  • 7.0.0                                ...           2 years ago
  • 6.1.1                                ...           2 years ago
  • 6.1.0                                ...           2 years ago
  • 6.0.0                                ...           2 years ago
  • 5.4.2                                ...           2 years ago
  • 5.4.1                                ...           2 years ago
  • 5.4.0                                ...           2 years ago
  • 5.3.0                                ...           2 years ago
  • 5.2.1                                ...           3 years ago
  • 5.2.0                                ...           3 years ago
  • 5.1.1                                ...           3 years ago
  • 5.1.0                                ...           3 years ago
  • 5.0.0                                ...           3 years ago
  • 4.1.4                                ...           3 years ago
  • 4.0.0                                ...           4 years ago
  • 3.2.2                                ...           4 years ago
  • 3.2.1                                ...           4 years ago
  • 3.2.0                                ...           4 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (2)
Downloads
Today 32
This Week 32
This Month 32
Last Day 0
Last Week 0
Last Month 33
Dependencies (0)
None
Dev Dependencies (10)

Copyright 2014 - 2017 © taobao.org |