JSCS v2.3.0 Release Notes
Release Date: 2015-07-10 // almost 9 years ago-
โก๏ธ A quick update! A few more rules, preset updates, and bug fixes!
๐ > If anyone missed it from the previous minor release, we've been working on https://github.com/cst/cst. This will help us continue to autofix more complex rules in the future. If you want to know more about it check out the changelog.
Now that we're done implementing all of ES6 the next major thing we'll be working on is intergrating CST into JSCS.
๐ New Rules:
disallowIdenticalDestructuringNames
(ES6) (Henry Zhu)// Valid for "disallowIdenticalDestructuringNames": true var {left, top} = obj; // shorthand var {left, top: topper} = obj; // different identifier let { [key]: key } = obj; // computed property
// Invalid for "disallowIdenticalDestructuringNames": true var {left: left, top: top} = obj;
disallowNestedTernaries
(Brian Dixon)// Valid for "disallowNestedTernaries": "true" // Valid for "disallowNestedTernaries": { "maxLevel": 0 } var foo = (a === b) ? 1 : 2;
// Invalid for "disallowNestedTernaries": true // Valid for "disallowNestedTernaries": { "maxLevel": 0 } var foo = (a === b) ? (a === c) ? 1 : 2 : (b === c) ? 3 : 4;
requireSpaceAfterComma
(Brian Dixon)To match requireSpaceBeforeComma
// Valid for "requireSpaceAfterComma": true var a, b;
// Invalid for "requireSpaceAfterComma": true var a,b;
โก๏ธ Preset Updates:
- Preset: add more comma rules to jquery and airbnb presets (Oleg Gaidarenko)
94f175e
- Preset:
wordpress
- changerequireCamelCaseOrUpperCaseIdentifiers
fromtrue
toignoreProperties
58ba037
๐ Bug fixes
- ๐ Fix:
disallowParenthesesAroundArrowParam
- account for non-identifiers (RestElement
,ArrayPattern
) correctly (Henry Zhu)bcfaa51
#1831 - ๐ Fix:
disallowCommaBeforeLineBreak
correctly handle empty object (Oleg Gaidarenko)6571ebb
#1841
Again, a big thanks to everything using JSCS! Definitely continue to report any bugs and new ideas! We always appreciate any help/PRs as we don't have that many resources!
hzoo
Other
- disallowDanglingUnderscores: correct documentation (Oleg Gaidarenko)
- Docs:
disallowMultipleVarDecl
typo (ValYouW) - Docs: couple small fixes (Oleg Gaidarenko)
- Internal:
Checker
- return correct arguments for excluded files (Oleg Gaidarenko) - Misc: remove babelType and just use node.type (Henry Zhu)
- Misc: Update CHANGELOG.md (Craig Klementowski)
- Misc: Use Chai (Marat Dulin)
- Preset: add more comma rules to jquery and airbnb presets (Oleg Gaidarenko)