This repository was archived by the owner on Mar 23, 2024. It is now read-only.
2.4.0
Version 2.4.0 (10-22-2015):
We're releasing pretty often now, right? :-)
Fix option
- The
--fixCLI flag can now be used programatically and through a.jscsrcconfig.
This is be useful for plugin authors (not only for jscs plugins but also for
grunt/gulp/etc...)
Preset updates
- The
jquerypreset (and dependant ones likewordpressandwikimedia) is less strict, whereasidiomaticis now more meticulous.
Couple new rules
disallowSpaceAfterComma- to have an opposite rule todisallowSpaceBeforeComma:
[1,2,3] // valid
[1, 2, 3] // invalidrequireAlignedMultilineParams- a nice addition to our indentation rules:
var test = function(one, two,
/*indent!*/ three) {
...
};Some new rule options
requireDotNotationnow supports fancy letters likeπ-
obj["ಠ_ಠ"] // This is wrong!
obj.ಠ_ಠ // Now you get it :-)maxNumberOfLinescan now ignore comments with the{"allExcept": ["comments"]}optionrequireObjectKeysOnNewLinecan ignore object properties on the same line with{"allExcept": ["sameLine"]}option -
var whatDoesAnimalsSay = {
cat: 'meow', dog: 'woof', fox: 'What does it say?' // this is cool now
};Fixes
- Account for bare blocks in both
disallowNewlineBeforeBlockStatementsanddisallowSpaceBeforeBlockStatements
// allows
var a = 1;
{
let b = 1;
}