Changelog
Version 2.10.0 (2016-02-15):
Happy Presidents Day!
In this release, it's just some additional rules to update to the airbnb preset, new rules, and fixes.
maximumLineLength
to the airbnb
preset (reference) (Oleg Gaidarenko)disallowSpacesInsideTemplateStringPlaceholders
to the airbnb
preset (not explicit but used in examples) (Oleg Gaidarenko)disallowNewlineBeforeBlockStatements
rule to the mdcs
preset (reference) (Mauricio Massaia)disallowSpacesInsideTemplateStringPlaceholders
(ikokostya)
Disallows spaces before and after curly brace inside template string placeholders.
// usage in config
"disallowSpacesInsideTemplateStringPlaceholders": true
// Valid
`Hello ${name}!`
// Invalid
`Hello ${ name}!`
`Hello ${name }!`
`Hello ${ name }!`
requireImportsAlphabetized
(Ray Hammond)Requires imports to be alphabetized
// usage in config
"requireImportAlphabetized": true
// Valid
import a from 'a';
import c from 'c';
import z from 'z';
// Invalid
import a from 'a';
import z from 'z';
import c from 'c';
requireSpaceBeforeKeywords
: add a allExcept
option for filtering out default keywords (gpiress)
requireNumericLiterals
: miss if first argument is an Identifier (Robert Jackson)disallowSpacesInsideTemplateStringPlaceholders
: skip the edge case (Oleg Gaidarenko)requirePaddingNewLinesBeforeExport
: exclude if only statement in block (Brian Schemp)maximumLineLength
: some nodes might contain null values (Oleg Gaidarenko)Changelog
Version 2.9.0 (2016-01-23):
Changed the changelog date format to be YYYY-MM-DD.
Whoo a release during this blizzard! Hopefully, this will be our last release before we start pushing out pre-release versions of 3.0. (If necessary, we can push bug fixes to 2.x)
The plan:
2.9.0
release2.x
branch off of master
master
to be the 3.0
branchChangelog
Version 2.8.0
Happy new year! Small changes this time, small, but important fixes which still warrants the minor bump.
Aside from bug fixes, this update includes improvement for the airbnb preset and allExcept
option for the disallowNewlineBeforeBlockStatements
Changelog
Version 2.6.0 (11-18-2015):
Thanks to @seanpdoyle, we're able to move some of the ES6 rules from ember-suave to JSCS!
Changelog
Version 2.5.1 (11-06-2015):
Just some bug fixes and an internal change before we integrate CST.
disallowUnusedParams
: ignore eval exressions (Oleg Gaidarenko)Configuration
: do not try to load presets with function values (Oleg Gaidarenko)requirePaddingNewLinesAfterBlocks
- don't throw on empty block (Oleg Gaidarenko)requireSpacesInGenerator
- account for named functions (Henry Zhu)Whitespace
token in preparation for using CST (Marat Dulin)Changelog
Version 2.5.0 (10-28-2015):
Thanks to markelog and Krinkle, the built-in wikimedia preset will be hosted at https://github.com/wikimedia/jscs-preset-wikimedia.
The purpose of this change is so that organizations can update their preset as needed without waiting for JSCS to update to another minor version (even though we are releasing more often anyway). The plan is to not update our preset dependencies until a new minor version of JSCS.
Example:
// JSCS package.json
"jscs-preset-wikimedia": "~1.0.0",
1.1.0
npm install
with jscs and will get version 1.0.0
of the wikimedia preset2.4.0
to 2.5.0
) which will update all presets.If you would like to maintain one of the default supported presets, please let us know.
Changelog
Version 2.4.0 (10-22-2015):
We're releasing pretty often now, right? :-)
Fix
option--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...
)
jquery
preset (and dependant ones like wordpress
and wikimedia
) is less strict, whereas idiomatic
is now more meticulous.disallowSpaceAfterComma
- to have an opposite rule to disallowSpaceBeforeComma
:[1,2,3] // valid
[1, 2, 3] // invalid
requireAlignedMultilineParams
- a nice addition to our indentation rules:var test = function(one, two,
/*indent!*/ three) {
...
};
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
};
disallowNewlineBeforeBlockStatements
and disallowSpaceBeforeBlockStatements
// allows
var a = 1;
{
let b = 1;
}
Changelog
Version 2.3.5 (10-19-2015):
Why not fix some more bugs!
requireSpacesInForStatement
account for parenthesizedExpression (Henry Zhu)// allows ()
for (var i = 0; (!reachEnd && (i < elementsToMove)); i++) {
disallowCommaBeforeLineBreak
: fix for function params (Henry Zhu)// allows
function a(b, c) {
console.log('');
}
requirePaddingNewLineAfterVariableDeclaration
- allow exported declarations (Henry Zhu)// allows
export var a = 1;
export let a = 1;
export const a = 1;
disallowSpaceAfterKeywords
- fix issue with using default keyword list (Henry Zhu)// fixes autofix from `return obj` to `returnobj`
disallowTrailingComma
, requireTrailingComma
- support ObjectPattern and ArrayPattern (Henry Zhu)// disallow
const { foo, bar } = baz;
const [ foo, bar ] = baz;
// require
const { foo, bar, } = baz;
const [ foo, bar, ] = baz;
hzoo