Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

2.11.0

Compare
Choose a tag to compare
@markelog markelog released this 02 Mar 19:32
· 278 commits to master since this release

Version 2.11.0 (2016-03-01):

Spring release! Yeah, yeah, technically spring only comes in middle of the March (you nerds, you), but we're coming to you a bit earlier!

Anyways, there are three new rules, a couple of changes for the airbnb preset and important fixes for disallowSpacesInsideTemplateStringPlaceholders and validateQuoteMarks (for all you ES7 lovers).

New Rules

requireSpaceBeforeDestructuredValues by Maks Sadowsky

Enforces colon spacing after destructuring assignment i.e. requireSpaceBeforeObjectValues but for destructuring.

// good
const { String: EmberString } = Ember;

// bad
const { String:EmberString } = Ember;

disallowArrayDestructuringReturn by Maks Sadowsky

Enforces the 5:3 verse of airbnb code style, which prohibits use of array destructuring for thy CallExpressions.

// God is on your side
const { left, right } = processInput(input);

// Devil is on your shoulder!
const [left, __, top] = processInput(input);

requireNewlineBeforeSingleStatementsInIf by Brian Schemp

Enforces using newlines in your parenthesesless code.

// Cool stairs brah
if (x)
   doX();
else
   doY();

// Just how could you have "X" and "Y"'s on the same line?!
if (x) doX();
else doY();

Presets

  • Preset: ease up on requireCamelCaseOrUpperCaseIdentifiers in airbnb (Oleg Gaidarenko)
  • Preset: add disallowArrayDestructuringReturn to airbnb preset (Maks Sadowsky)

Bug fixes

  • disallowSpacesInsideTemplateStringPlaceholders: check template literal (ikokostya)
  • validateQuoteMarks: do not throw on es7 decorators (Oleg Gaidarenko)

Other commits (as always) are omitted, since they're all about internal stuff and we care about your viewing pleasure.