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

v2.7.0

Compare
Choose a tag to compare
@hzoo hzoo released this 09 Dec 00:31
· 322 commits to master since this release

Version 2.7.0 (12-08-2015):

It's this time of the year again, 2.7 is here!

One new rule, cool amount of fixes and massive jsdoc rule set update.

New Rules

Although there's only one new rule in this release, it's pretty powerful! Say thanks to @ficristo!

requireEarlyReturn

// This is cool 
function test() {
     if (x) {
         return x;
     }
     return y;
}

// This is not 
function test() {
    if (x) {
        return x;
    } else {
        return y;
    }
}

This is one of the most popular patterns out there, such as in idiomatic and node-style-guide.

Presets

  • The idiomatic and node-style-guide presets now have the requireEarlyReturn rule.
  • Whereas the airbnb preset is better in treating JSX.

Bug Fixes

  • disallowTrailingWhitespace changes for autofix (thanks @lukeapage!)
  • requirePaddingNewlinesBeforeKeywords: allow function return on the same line
  • disallowMixedSpacesAndTabs: fix issue with erroring on block comments
  • auto-configure: set maxErrors to Infinity

Notable Changes in jsDoc

  • Improves ES6 support for enforceExistence: add exceptions for arrow functions and ES6 modules exports
  • Many fixes related to requireDescriptionCompleteSentence
  • Fixes for incorrecly sticked docblocks to IIFE
  • Docblocks without tags now parsing correctly
  • Adds @override to jsdoc3 preset
  • Arrow functions now treats as usual functions

See the full list in jscs-jsdoc changelog.