This repository was archived by the owner on Mar 23, 2024. It is now read-only.
v2.7.0
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
idiomaticandnode-style-guidepresets now have therequireEarlyReturnrule. - Whereas the
airbnbpreset is better in treating JSX.
Bug Fixes
disallowTrailingWhitespacechanges for autofix (thanks @lukeapage!)requirePaddingNewlinesBeforeKeywords: allow function return on the same linedisallowMixedSpacesAndTabs: fix issue with erroring on block commentsauto-configure: setmaxErrorstoInfinity
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
@overridetojsdoc3preset - Arrow functions now treats as usual functions
See the full list in jscs-jsdoc changelog.