JSCS v2.1.0 Release Notes
-
Overview
๐ In this release, we added three more rules: two of them are ES6-only, they "protect" you ๐ from the downside of arrow functions (see 1 and 2 for an explanation of why you might want to enable them) and another universal one if you like to keep your object neat and tidy.
๐ Airbnb, jQuery, and Wordpress presets are now using some of the new rules we added in the previous release. Whereas, the wikimedia preset is now less strict for JSDoc comments.
๐ This release also includes a JSON reporter, lots of bug fixes and enhancements, plus couple new rule values for your linting pleasure.
Presets
- Preset: define exclusions for wordpress preset (Weston Ruter)
- Preset: add couple new rules to airbnb preset (Christophe Hurpeau)
- Preset: Set jsDoc.checkTypes to "strictNativeCase" for Wikimedia (Timo Tijhof)
- Preset: add "disallowSpaceBeforeComma" rule to jquery preset (Oleg Gaidarenko)
๐ New rules
- ๐ New Rule: disallowShorthandArrowFunctions (Jackson Ray Hamilton)
- ๐ New Rule: disallowArrowFunctions (Jackson Ray Hamilton)
- ๐ New Rule: validateOrderInObjectKeys (Rui Marinho)
๐ New rule values
- disallowEmptyBlocks: allow blocks with comments (Michael Robinson)
- requirePaddingNewlinesAfterUseStrict: allow immediate "require" (Michael Robinson)
- ๐ป requireAnonymousFunctions: Add exception for function declarations (Kai Cataldo)
- requireBlocksOnNewline: Add object option to handle comments (oredi)
- โ requireTemplateString: string and template string concatentation support (Michelle Bu)
โจ Enhancements
- ๐ง Configuration: allow load configs with ".jscsrc" extension (Oleg Gaidarenko)
- Reporters: add new JSON reporter (Roman Blanco)
- ๐ง Configuration: extend and improve default value of array options (Oleg Gaidarenko)
- ๐ SpaceBeforeObject(Keys|Values): support spread in object literals (Ronn Ross)
- SpacesInAnonymousFunctionExpression: consider ES6 "constructor" method (Oleg Gaidarenko)
- validateIndentation: reduce RegExp create count (optimization) (Roman Dvornov)
- validateAlignedFunctionParameters: small simplification (Oleg Gaidarenko)
- disallowEmptyBlocks: should not report empty arrow blocks (Jake Zatecky)
- validateAlignedFunctionParameters: account for arrow functions (Jake Zatecky)
- requirePaddingNewlinesAfterBlocks: ignore parentheses of last item (Christophe Hurpeau)
๐ Bugs
- ๐ requireMatchingFunctionName: fix critical bug and add tests (Alexej Yaroshevich)
- disallowSpacesInCallExpression: report only on a node's round brace (Joel Kemp)
- disallowSpacesInCallExpression: consider fitting parentheses case (Oleg Gaidarenko)
- CLI: correct reporter error (Roman Dvornov)
- โก๏ธ SpacesIn*: fix for shorthand methods/class methods, update tests (Henry Zhu)
- requireAlignedObjectValues: fix computed keys with MemberExpressions (Henry Zhu)
- requireParenthesesAroundArrowParam: account for a single rest parameter (Henry Zhu)
- requirePaddingNewLinesBeforeLineComments: fix for newlines above comment (Henry Zhu)
๐ Docs
- ๐ Docs: Fix a typo in requireVarDeclFirst (Chayoung You)
- ๐ Docs: point to jscs.info for the list of maintainers (Oleg Gaidarenko)
- ๐ Docs: improve preset documentation (Oleg Gaidarenko)
- ๐ Docs: Fix typos in requireCapitalizedComments (Chayoung You)
- ๐ Docs: Fix a typo in maximumNumberOfLines (Chayoung You)
- ๐ Docs: Add justifications for arrow function rules (Jackson Ray Hamilton)
- ๐ Docs: correct docs for the" disallowNodeTypes" rule (Dmitry Semigradsky)
- ๐ Docs: Fixed typo, update link for clarity/correct URL (Kai Cataldo)
- ๐ Docs: Fixed typo in disallowSpaceAfterObjectKeys (Brian Ng)
- ๐ Docs: use correct links to new rules (Pavel Zubkou)
- ๐ Docs: bring back coveralls badge (Oleg Gaidarenko)
- ๐ Docs: Error 404 on the requireObjectKeysOnNewLine link (Roman Nuritdinov)
- ๐ Docs: Link to built-in JSCS plugin for JetBrains IDEs (Simen Bekkhus)
- ๐ Docs: improve and correct the changelog (Oleg Gaidarenko)
- ๐ Docs: small example improvement for "disallowSpaceBeforeComma" rule (Oleg Gaidarenko)
Misc
- โ requireLineFeedAtFileEnd: Test to ensure IIFE case still reports (Joel Kemp)
- Misc: add Henry to list of maintainers (Oleg Gaidarenko)
- Misc: make jshint happy (Oleg Gaidarenko)
- Misc: exclude only problematic module from coverage (Oleg Gaidarenko)
- Misc: once again hide coverage status (Oleg Gaidarenko)
- ๐ Misc: correct merge artefact (Oleg Gaidarenko)
- ๐ Misc: support spread in object literals (Henry Zhu)
- โก๏ธ Misc: update Esprima to 2.5.0 (Henry Zhu)
- ๐ท Misc: cache
node_modules
dir in travis CI (Oleg Gaidarenko) - โ AutoConfigure: Tests now depend on a preset clone (Joel Kemp)
- โช Revert "Changelog: use conventional-change..." (Oleg Gaidarenko)
- ๐ Changelog: use conventional-changelog and conventional-github-releaser (Steve Mao)