This repository has been 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
--fix
CLI flag can now be used programatically and through a.jscsrc
config.
This is be useful for plugin authors (not only for jscs plugins but also for
grunt
/gulp
/etc...
)
Preset updates
- The
jquery
preset (and dependant ones likewordpress
andwikimedia
) is less strict, whereasidiomatic
is now more meticulous.
Couple new rules
disallowSpaceAfterComma
- to have an opposite rule todisallowSpaceBeforeComma
:
[1,2,3] // valid
[1, 2, 3] // invalid
requireAlignedMultilineParams
- a nice addition to our indentation rules:
var test = function(one, two,
/*indent!*/ three) {
...
};
Some new rule options
requireDotNotation
now supports fancy letters likeπ
-
obj["ಠ_ಠ"] // This is wrong!
obj.ಠ_ಠ // Now you get it :-)
maxNumberOfLines
can now ignore comments with the{"allExcept": ["comments"]}
optionrequireObjectKeysOnNewLine
can 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
disallowNewlineBeforeBlockStatements
anddisallowSpaceBeforeBlockStatements
// allows
var a = 1;
{
let b = 1;
}