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)