jscs v2.11.0 Release Notes

Release Date: 2016-03-02 // about 8 years ago
  • ๐Ÿ”– 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.

    // goodconst { String: EmberString } = Ember;// badconst { 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 sideconst { 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 brahif (x) doX();elsedoY();// 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.