All Versions
95
Latest Version
Avg Release Cycle
16 days
Latest Release
2836 days ago

Changelog History
Page 3

  • v2.3.3 Changes

    πŸ› Bug fixes

    • πŸ›  Fixed an error with disallowUnusedParams and es6 imports 63526b7 #1875

    • πŸ›  Fixed an autofix issue with all function spacing rules and not accounting for the async keyword cf134a1 #1873

    hzoo

  • v2.3.2 Changes

    πŸ›  Fix an issue with --extract option being true by default

  • v2.3.1 Changes

    πŸš€ A bunch of bug fixes in this release!

    The Future

    πŸš€ We are probably going to start 3.0 for the next release (mainly integrating CST into JSCS). If you want to know more about CST check out the previous changelog.

    πŸš€ Our current plan is to move our 3.0/cst branch to master and then create a 2.x branch to continue to release bug fixes / contributer PRs. The core team will be mainly focused on tackling issues on our 3.0 roadmap (which we are still planning). We would love to hear your feedback on what you think should be in 3.0 and beyond!

    πŸ› Bug fixes

    // Allow MemberExpressions: require('a').b.c;
    var fs = require('fs');
    var Emitter = require('events').EventEmitter;
    
    // this should be allowed
    var f = {
        "name": 1,
        "x": 2
    };
    
    // Should output:
    // Param unusedParam is not used at input
    var a = function(unusedParam) {}
    
    // check all keys
    var x = {
      bar: 1,
      foo: $(".foo") // error here
    };
    
    // Don't error with this
    const [beep, boop] = meep;
    var $s = $("#id")
    
    • πŸ”§ CLI - "auto-configure" argument should always be at the end (Oleg Gaidarenko)
    // correct autoconfigure args
    jscs --autoconfigure ./files/here
    
    • πŸ“œ js-file - make parser not confuse token types (Oleg Gaidarenko)
    // Fixes issues with keywords like with
    class A {
      catch() {}
    }
    

    Again, a big thanks to everything using [JSCS](jscs.info)! Definitely continue to report any bugs and new ideas! We always appreciate any help/PRs!

    We'll probably be moving more of the new rule/option issues to orphaned which just means that they are on hold but anyone can still PR it or reopen it later. Remember to tweet at us at @jscs_dev and chat with us on our gitter room!

    hzoo

  • v2.3.0 Changes

    July 10, 2015

    ⚑️ 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 - change requireCamelCaseOrUpperCaseIdentifiers from true to ignoreProperties 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)
  • v2.2.1 Changes

    πŸ› Bug fix:es

    Quick fix related to checker not returning correctly with excluded files.

  • v2.2.0 Changes

    Again, it's been way too long since the last version; we're going to be releasing more often in the future!

    πŸš€ In this release, we have a nicer homepage, 5 new rules, 4 more autofixable rules, many new rule options/bug fixes, and a [email protected] update.

    We also added support for using YAML in config files, checking JS style in HTML files, and are trying out some non-stylistic rules (like disallowUnusedParams)!

    πŸ‘ Be on the look out for https://github.com/cst/cst (just finished ES6 support this weekend) if you haven't already.

    πŸ‘ Autofixing: Support for 4 more rules!

    πŸ‘ Thanks to @markelog, we also have autofix support for the following rules:

    πŸ‘ > We will also be labeling which rules don't support autofixing (only a few).

    πŸ‘• Configuration: YAML support, and linting JS in HTML files

    πŸ‘ We weren't even thinking about different config formats, but @ronkorving stepped in and added support for using YAML as a config format!

    So now you can use a .jscsrc / jscs.json (JSON) file or a .jscs.yaml (YAML) file.

    πŸ‘• @lahmatiy has landed support for linting javascript in HTML files with the extract option! Thanks so much for sticking with us for that PR.

    Example usage:

    jscs ./hello.html --extract *.html
    

    πŸ†• New Rules

    disallowMultiLineTernary (Brian Dixon)

    // Valid for "disallowMultiLineTernary": true
    var foo = (a === b) ? 1 : 2;
    

    requireMultiLineTernary (Brian Dixon)

    // Valid for "requireMultiLineTernary": true
    var foo = (a === b)
      ? 1
      : 2;
    

    disallowTabs (Mike Ottum)

    It disallows tab characters everywhere!

    disallowUnusedParams (Oleg Gaidarenko)

    πŸ‘ Another cool rule @markelog added is actually a non-stylistic rule with autofixing support! It checks to make sure you use the parameters in function declarations and function expressions!

    // Invalid since test is unused
    function x(test) {
    }
    var x = function(test) {
    }
    

    validateCommentPosition (Brian Dixon)

    πŸ‘• Comments that start with keywords like eslint, jscs, jshint are ignored by default.

    /* Valid for "validateCommentPosition": { position: `above`, allExcept: [`pragma`] } */
    // This is a valid comment
    1 + 1; // pragma (this comment is fine)
    
    /* Valid for "validateCommentPosition": { position: `beside` } */
    1 + 1; // This is a valid comment
    

    Just as a reminder, you can disable certain AST node types with the disallowNodeTypes rule which takes in an array of node types.

    For example: if you want to disable arrow functions for some reason, you could do

    "disallowNodeTypes": ['ArrowFunctionExpression'].

    ⚑️ Presets: Idiomatic.js and other updates

    πŸ‘ We finally added support for Idiomatic.js! There are a few more rules we still need to add, so leave a comment in the issue or create a new one.

    • 🚚 Google: remove capitalizedNativeCase option in the JSDoc checkTypes rule (Sam Thorogood)
    • Idiomatic: add initial preset (Henry Zhu)
    • jQuery: add disallowSpacesInCallExpression rule to (Oleg Gaidarenko)
    • jQuery: use ignoreIfInTheMiddle value for requireCapitalizedComments rule (Oleg Gaidarenko)
    • jQuery: add validateIndentation rule (Oleg Gaidarenko)
    • Wikimedia: enable es3 (James Forrester)

    Rule Options/Changes

    • requireSpacesInsideParentheses: ignoreParenthesizedExpression option (Oleg Gaidarenko)
    • πŸ‘» disallowSpaceAfterObjectKeys: add method exception option (Alexander Zeilmann)
    • disallowSpaceBeforeSemicolon: add allExcept option (Oleg Gaidarenko)
    • requireCapitalizedComments: add ignoreIfInTheMiddle option (Oleg Gaidarenko)
    • disallowSpacesInsideParentheses: add quotes option (Oleg Gaidarenko)
    • requireSpacesInsideParentheses: add quotes option (Oleg Gaidarenko)
    • 0️⃣ requireCapitalizedComments: add default exceptions (alawatthe)
    • requireArrowFunctions: create an error on function bind (Henry Zhu)
    • βœ… Misc: Bucket all rules into groups, test case to ensure new rules have a group (indexzero)

    πŸ› Bug fixes

    πŸ›  We fixed a bug with exit codes not matching the wiki (Oleg Gaidarenko).

    • disallowParenthesesAroundArrowParam: fix check for params (Henry Zhu)
    • spacesInsideBrackets: account for block comments (Oleg Gaidarenko)
    • disallowSemicolons: ignore needed exceptions (Oleg Gaidarenko)
    • spacesInFunctionExpression: account for async functions (MikeMac)
    • disallowSpaceBeforeSemicolon: do not trigger error if it's first token (Oleg Gaidarenko)
    • requireCapitalizedComments: consider edge cases (Oleg Gaidarenko)
    • requireSemicolons: handle phantom cases (Oleg Gaidarenko)
    • spaceAfterObjectKeys: fix for computed properties with more than one token (Henry Zhu)
    • 0️⃣ Exclude .git folder by default (Vladimir Starkov)

    ⚑️ JSDoc updates

    What's JSCS?

    The homepage now showcases what JSCS actually does. We were missing a :cat: picture as well so ...

    cat

    If you have any feedback on the site, leave a comment at our website repo.

    ΰΌΌ ぀ β—•_β—• ༽぀ GIVE CST!

    We've also been busy working on https://github.com/cst/cst.

    πŸ“„ cst

    πŸ’… CST stands for Concrete Syntax Tree, as opposed to AST which stands for Abstract Syntax Tree. CST uses a regular AST but adds support for information that you normally don't care about but is vital for a style checker, e.g. spaces, newlines, comments, semicolons, etc. Using a CST will allow us to support more complex autofixing such as adding curly braces while retaining other formatting or much larger transformations.

    πŸ“œ We just finished supporting all of ES6 this past weekend. ES6+ and JSX support is also in progress! We'll be integrating CST into JSCS in the 3.0 branch, so look out for that soon (CST uses babel as its AST parser).

    If you're interested, there was a lot of discussion on CSTs at the ESTree repo.


    Hopefully we can get more community help for JSCS! (check out CONTRIBUTING.md if you're interested)

    We have a beginner-friendly tag for people to get started on issues.

    Small personal sidenote

    Thanks to everyone who has been submitting issues/PRs!

    It's been almost a year since I (hzoo) really started contributing to open source. It's still crazy to me that my first pull request was just adding the table of contents. I was so excited to contribute that day!

    πŸ›  Little did I know I would slowly do more and more - typo fixes, docs changes, bugfixes, rules, and then eventually become part of the team! I've become a better communicator and become more confident to give and take constructive feedback. I'm currently still figuring out how to review PRs, label issues, do changelogs (like right now), release, etc.

    πŸ’… So much has happened after starting that one simple contribution! Even though I know a lot more about ASTs, javascript/node, and programming style, it all adds up to much more than that technical knowledge.

    πŸ‘• Contributing here helped me make PRs to a lot of other projects (in my case babel, eslint, and others). I understand more that it doesn't take a special person to start helping out. I really hope to encourage others to join our awesome open source community at large!

    hzoo

    Other Awesome Changes!

    • CLI: correct describe description (Roman Dvornov)
    • 🚚 ClI: move handleMaxErrors helper to the more appropriate place (Oleg Gaidarenko)
    • CLI: set maxErrors to Infinity for autoconfigure (Henry Zhu)
    • disallowSemicolons: simplify disallowSemicolons rule (Oleg Gaidarenko)
    • πŸ“„ Docs: another portion of changelog fixes (Oleg Gaidarenko)
    • πŸ“„ Docs: Correct documentation for requireCapitalizedComments (Alexander Zeilmann)
    • πŸ“„ Docs: disallowParenthesesAroundArrowParam (Samuel Lindblom)
    • πŸ“„ Docs: fix markdown for disallowMultipleSpaces (MariΓ‘n RusnΓ‘k)
    • πŸ“„ Docs: fix markdown in requireBlocksOnNewline (MariΓ‘n RusnΓ‘k)
    • πŸ“„ Docs: fix markdown in requireCapitalizedComments (MariΓ‘n RusnΓ‘k)
    • πŸ“„ Docs: fixup broken links (Henry Zhu)
    • πŸ“„ Docs: improve documentation for various rules (oredi)
    • πŸ“„ Docs: improve documentation for various rules (oredi)
    • πŸ“„ Docs: remove unnecessary paragraph, use js syntax highlighting (Dennis Wissel)
    • πŸ“„ Docs: small changelog corrections (Oleg Gaidarenko)
    • πŸ“„ Docs: small correction for the disallowEmptyBlocks rule (Oleg Gaidarenko)
    • js-file: add getScope method (Oleg Gaidarenko)
    • 🚚 js-file: add removeToken method (Oleg Gaidarenko)
    • js-file: all return values should be consistent (Oleg Gaidarenko)
    • js-file: check argument of the file#getNodeRange (Oleg Gaidarenko)
    • js-file: do not interpret html as grit instructions (Oleg Gaidarenko)
    • js-file: make grit regexp case-insensitive (Oleg Gaidarenko)
    • Misc: add only property to reportAndFix assert helper (Oleg Gaidarenko)
    • πŸ‘• Misc: make jslint happy (Oleg Gaidarenko)
    • πŸ‘• Misc: make lint happy (Oleg Gaidarenko)
    • Misc: use node "4" instead of node "4.0" in travis (Henry Zhu)
    • πŸ’… Misc: correct code style violations (Oleg Gaidarenko)
    • Misc: add node 4.0 to travis (Henry Zhu)
    • βœ… Misc: autofix tests for rules that are not supported by default presets (Oleg Gaidarenko)
    • 0️⃣ Misc: change default mocha reporter (Oleg Gaidarenko)
    • Misc: disable duplicative jshint check for semicolons (Oleg Gaidarenko)
    • βœ… Misc: do not show console.error at the test run (Oleg Gaidarenko)
    • Misc: increase coverage and use console.error for maxError output (Oleg Gaidarenko)
    • Misc: increase rules coverage (Oleg Gaidarenko)
    • πŸ“¦ Misc: use full lodash package (Oleg Gaidarenko)
    • Misc: add requireSemicolons rule to our jscsrc (Oleg Gaidarenko)
    • πŸ”€ requireCapitalizedComments: remove merge artefacts (Oleg Gaidarenko)
    • *Semicolons: increase coverage (Oleg Gaidarenko)
    • String-checker: pass file instance to _fix method (Oleg Gaidarenko)
    • Strip BOM from config files (Jonathan Wilsson)
    • πŸ‘Œ Support null and -1 values for maxErrors option (Daniel Anechitoaie)
    • βœ… Tests: improve reportAndFix assertion helper (Oleg Gaidarenko)
    • Utils: add isPragma method (Brian Dixon)
  • v2.1.1 Changes

    Overview

    πŸš€ This release consists mostly of bug-fixes. Check them out – there are a lot of them!

    🐎 We also managed to squeeze two new rules - requireSpacesInsideParenthesizedExpression and disallowSpacesInsideParenthesizedExpression, increase performance, and improve ES6 support.

    πŸ›  Fix regarding global jscs installs and plugins

    One of the biggest issues fixed: a global jscs install can finally load local extensions (Γ  la gulp style) like error-filters, plugins, additional rules, and presets.

    πŸ‘• This will fix issues with using a custom preset with something like SublimeLinter which uses the global jscs install.

    • πŸ“¦ To make a custom preset, you need to publish a npm package with a jscs config file
    • πŸ“¦ We recommend the package name starts with jscs-preset- or with jscs-config- to help with searching for presets on npm and defining it in your config
    • This would allow you to specify your preset more succinctly: ”preset”: β€œawesome” instead of ”preset”: β€œjscs-preset-awesome”
    • πŸ“¦ You can also share multiple presets in one package with ”preset”: β€œawesome/super-awesome”, provided that you have super-awesome.{json, js} in your package root directory
    • Create a jscs.json file to store your jscs config
    • πŸ“¦ In your package.json, set the main field to jscs.json
    // example package.json in `jscs-config-awesome`
    {
      β€œname”: β€œjscs-config-awesome”,
      β€œversion”: β€œ1.0.0”,
      β€œmain”: β€œjscs.json”
    }
    
    // example .jscsrc using a custom preset
    // assuming the preset package name is `jscs-config-awesome`
    {
      β€œpreset”: β€œawesome”,
      β€œdisallowEmptyBlocks”: false // example of disabling a preset rule with false
    }
    

    πŸ“š We will add more comprehensive documentation for this feature a bit later, so stay tuned.

    Disable a rule with false or null

    You can use false (instead of only null) to disable a rule (such as in a preset). This was a point of confusion for newer users. To disable a rule you can do:

    {
      β€œpreset”: β€œairbnb”,
      β€œdisallowEmptyBlocks”: null // disabling a rule with null
      β€œdisallowSpacesInCallExpression”: false // disabling a rule with false
    }
    

    πŸ†• New Rules

    • πŸ†• New Rule: SpacesInsideParenthesizedExpression (Richard Gibson)

    ✨ Enhancements

    • πŸ”§ Configuration: disable any rule if its value equals to "false” (Oleg Gaidarenko)

    πŸ› Bug fixes

    • requireDollarBeforejQueryAssignment: Ignore destructuring assignment (Simen Bekkhus)
    • validateIdentation: fix on empty switch blocks (Henry Zhu)
    • disallowQuotedKeysInObjects: fix allowing quoted non-reserved keys (Alexej Yaroshevich)
    • disallowParenthesesAroundArrowParam: allow destructuring of param (Henry Zhu)
    • requireTrailingComma: correct error message (monk-time)
    • requirePaddingNewLinesAfterBlocks: do not report arrow fn chaining (Oleg Gaidarenko)
    • safeContextKeyword: miss destructuring assignment (Oleg Gaidarenko)
    • πŸ”§ disallowNodeTypes: correct configure error (Alexander Zeilmann)
    • requireDollarBeforejQueryAssignment: Ignore destructuring assignment (Simen Bekkhus)
    • paddingNewlinesInBlocks: add exceptions and open/close options (Kai Cataldo)
    • requireSpacesInAnonymousFunctionExpression: add allExcept option (Ken Sheedlo)
    • πŸ‘ curlyBraces: support for..of statements (regseb)

    Misc

    • πŸ”§ Configuration: allow load of external entities from external preset (Oleg Gaidarenko)
    • πŸ”§ CLI:Configuration: load local jscs modules if present (Oleg Gaidarenko)
    • 🐎 JsFile: Improve getNodeByRange performance (Richard Gibson)
    • βœ… disallowQuotedKeysInObjects: rework tests and deprecate allButReserved value (Alexej Yaroshevich)

    πŸ“„ Docs

    • πŸ“„ Docs: update examples on how to disable (Oleg Gaidarenko)
    • πŸ“„ Docs: improve documentation for various rules (oredi)
    • πŸ“„ Docs: fix typos in examples for disallowSpaceAfterObjectKeys (Yoni Medoff)
    • πŸ“„ Docs: improve documentation for various rules (oredi)
    • πŸ“„ Docs: small changelog corrections (Oleg Gaidarenko)
    • πŸ“„ Docs: make it clearer node_modules is excluded, and ! can be used to include (Henry Zhu)
  • v2.1.0 Changes

    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)
  • v2.0.0 Changes

    Overview

    πŸš€ Gosh! We haven’t released a new version in more than two months! What have we done all this time? Well, we were working hard on the next big step - 2.0!

    And we’re finally ready to show it to you. We’ve improved JSCS all over the place!

    esnext

    πŸ“œ It was a big pain to check ES6/JSX code with JSCS, since you had to install special extensions or different parsers. Well, no more of that! Thanks to all the hard work of the @hzoo, now you can just write "esnext": true in your config or execute JSCS from the CLI with the --esnext flag. πŸ“œ Now all that new fancy code will be examined without any hassle, as decorators, function bind (::) operator, and all valid babel code can be checked by JSCS.

    πŸ‘€ We also added seven ES6-only rules; see below for more information.

    Autofixing

    πŸ‘ We really want to support autofixing for as many rules as possible. But as it turns out, we are at forefront of this problem; it’s really hard to change the code without affecting unrelated instructions.

    What we need is a Concrete Syntax Tree, instead of the AST + tokens structures that we use now. Unfortunately, there is no CST standard for JavaScript at the moment – this is why we decided to step up and come up with our vision of a CST - https://github.com/mdevils/cst. Currently, we are working with the estree team on this proposal – hoping the development of this crucial part of JavaScript parsing will move faster.

    β†ͺ Meanwhile, using some workarounds and hacks, we managed to support autofixing for 4 more rules:

    πŸ†• New rules

    There are 31 new rules, including 16 rules for JSDoc validation, and 7 ES6-only rules:

    πŸ†• New ES6-only rules

    πŸ‘€ There are also a lot of new rule values (see the "Changelog" section) which makes a lot of rules more flexible.

    We also added new rules and values to some presets. If you feel that we’ve missed something, don't be quiet! Send us a PR and we will surely add the needed rules to your favorite preset.

    πŸ”Œ Simplified inclusion of plugins, presets, and custom rules

    Since every possible JSCS extension can now be loaded without defining its full path, it is enough to just specify the needed dependency to your project so it can be found by JSCS.

    {
      "plugins": ["./your-local-package"], // Same with `additionalRules` and `preset` options
      "plugins": ["jscs-your-npm-package"],
      "plugins": ["your-npm-package"], // can omit β€œjscs-” prefix if you want
    }
    

    Other

    • πŸ‘Œ Support for disabling rules on a single line -

      if (x) y(); // jscs:ignore requireCurlyBraces
      if (z) a(); // will show the error with `requireCurlyBraces`
      
    • Two new reporters - summary (could be very helpful to acquire full overview of all possible errors in your project) and unix. You could enable them by providing --reporter=<reporter name> flag.

    • 0️⃣ node_modules path is included by default to excludeFiles

    • πŸ”Œ For every possible error, like missing or corrupted config, JSCS now provides different exit-codes. We believe it might be useful for piping, editors plugins, etc.

    • JSCS (like any good unix program) now obeys the rule of silence.

    πŸ›  And of course, a lot of bug-fixes, improved ES6 support of existing rules, docs, infrastructure changes, etc.

    πŸ”¨ Although this is major version, we didn't remove deprecated rule values or changed config format, we expecting to do this in the 3.0 version while switching to CST and fully refactor JSCS code-base.

    πŸ”„ Changelog

    Backward incompatible changes

    • 🚚 Utils: remove comma from list of binary operators (Oleg Gaidarenko)
    • 🚚 Checker: remove deprecated constructor options (Oleg Gaidarenko)
    • Obey the Rule of Silence (Feross Aboukhadijeh)
    • πŸ”§ Configuration: add ability to load external presets (Oleg Gaidarenko)
    • πŸ”§ Configuration: small corrections to JSDoc of "node-configuration" module (Oleg Gaidarenko)
    • πŸ”¨ Configuration: small refactoring of the configuration module (Oleg Gaidarenko)
    • πŸ”§ Configuration: allow "getReporter" method to require node modules (Oleg Gaidarenko)
    • πŸ”§ Configuration: initial pass on the polymorphic require (Oleg Gaidarenko)
    • Checker: more API changes for 2.0 (Oleg Gaidarenko)
    • CLI: Differentiate exit codes (Oleg Gaidarenko)
    • 0️⃣ Misc: set default value of maxErrors option to 50 (Oleg Gaidarenko)
    • 🚚 yodaConditions: remove comparison operators from default set (Oleg Gaidarenko)
    • 🚚 Misc: remove all deprecated rules/tests (Henry Zhu)
    • API: allow external entities to be defined without "jscs" prefix (Oleg Gaidarenko)
    • πŸ”§ Configuration: exclude node_modules/ by default (Louis Pilfold)
    • CLI: set "maxErrors" to Infinity with enabled "fix" option (Oleg Gaidarenko)
    • 0️⃣ Misc: change default dialect to es5 and make appropriate changes (Alexej Yaroshevich)

    Autofix

    • πŸ”€ Autofix: remove merge artefact (Oleg Gaidarenko)
    • πŸ‘ Autofix: support disallowTrailingComma rule (Oleg Gaidarenko)
    • πŸ‘ Autofix: support trailing whitespaces and missing commas (Andrzej Wamicz)
    • validateQuoteMarks: try out "fix" field (Oleg Gaidarenko)

    Preset

    • Preset: requireSemicolons = true for google preset (BigBlueHat)
    • Preset: add jsDoc rules to relevant presets (Oleg Gaidarenko)
    • Preset: add disallowTrailingWhitespace to MDCS (Joshua Koo)
    • Preset: add requireVarDeclFirst rule to the relevant presets (Oleg Gaidarenko)
    • ⚑️ Preset: update Wordpress preset (Ivo Julca)
    • Preset: add requireCapitalizedComments to jquery and wordpress presets (Oleg Gaidarenko)
    • ⚑️ Preset: update mdcs (Joshua Koo)
    • Preset: require trailing comma in airbnb preset (Christophe Hurpeau)
    • Preset: add missing rules to google preset (Christophe Hurpeau)
    • ⚑️ Preset: update airbnb preset (Craig Jennings)
    • ⚑️ Preset: update jquery and dependant presets (Oleg Gaidarenko)
    • πŸ’… Preset: require spaces in anonymous FE for crockford style (Oleg Gaidarenko)
    • Preset: fix requireDotNotation rule value according to es3 changes (Alexej Yaroshevich)
    • 🚚 Preset: remove jsdoc rules from yandex preset (Oleg Gaidarenko)

    πŸ†• New rules

    • πŸ†• New rules: add SpaceBeforeComma rules (shashanka)
    • πŸ†• New Rule: requireVarDeclFirst (oredi)
    • πŸ†• New Rule: add JSDoc rules (Oleg Gaidarenko)
    • πŸ†• New Rule: (disallow|require)SpaceBeforeSemicolon (Richard Munroe)
    • πŸ†• New Rule: requireMatchingFunctionName (Pavel Strashkin)
    • πŸ†• New Rule: requireTemplateStrings (Henry Zhu)
    • πŸ†• New Rule: (require|disallow)ParenthesesAroundArrowParam (Henry Zhu)
    • πŸ†• New Rule: requireSpread (Henry Zhu)
    • πŸ†• New Rule: requireShorthandArrowFunctions (Henry Zhu)
    • πŸ†• New Rule: requireArrowFunctions (Henry Zhu)
    • πŸ†• New Rule: disallowNodeTypes (Henry Zhu)
    • πŸ†• New Rule: requireNumericLiterals (Henry Zhu)
    • πŸ†• New Rule: (disallow|require)ObjectKeysOnNewLine (Eli White)

    πŸ†• New rule values

    • πŸ‘ requireYodaConditions: support an array of operators (Ivo Julca)
    • πŸ‘ disallowYodaConditions: support an array of operators (Ivo Julca)
    • (require|disallow)AnonymousFunctionExpression: account for shorthand methods (Henry Zhu)
    • πŸ‘» disallowMultipleVarDecl: add exception for require statements (Stefano Sala)
    • disallowSpaceAfterObjectKeys: added ignoreAligned option (Andrey Ermakov)
    • maximumLineLength: allow function delcarations to exceed limit (Clay Reimann)
    • requirePaddingNewLinesAfterBlocks: add "inNewExpressions" to exceptions (Mato Ilic)
    • disallowCommaBeforeLineBreak: added allExcept function (Andrey Ermakov)
    • πŸ”§ requirePaddingNewlinesInBlocks: Add object option to configuration (oredi)
    • πŸ‘» maximumLineLength: Add exception for long require expressions (Philip Hayes)
    • πŸ†• NewlineBeforeBlockStatement: allow settings per block statement type (Dave Hilton)
    • validateIndentation: add option to ignore comments (Danny Shternberg)

    ✨ Enhancements for ES6 support

    • πŸ‘ requireSemicolons: Add support for import and export declarations (Roman Dvornov)
    • ⬆️ Esprima: Upgrade to 2.4.0 (Joel Kemp)
    • requireArrowFunctions: don't check AssignmentExpression or Property (Henry Zhu)
    • 0️⃣ SpacesInFunctionDeclaration: check export default function (Henry Zhu)
    • πŸ‘ AlignedObjectValues: support computed property names (Henry Zhu)
    • (disallow|require)SpaceAfterObjectKeys: check object method shorthand (Henry Zhu)
    • πŸ‘ (require|disallow)SpaceAfterObjectKeys: support computed properties (Henry Zhu)
    • SpacesInsideObjectBrackets: Add Check for destructive assignments (Oleg Gaidarenko)
    • Misc: use babel-jscs for the esnext option (Henry Zhu)
    • requireSemicolons: Don't warn on class and function exports (Roman Dvornov)

    Inline control

    • Errors: Ability to suppress a single line (Louis Pilfold)
    • 🚚 StringChecker: Remove grit processing includes (Tony Ganch)

    πŸ†• New reporters

    • πŸ’… Reporters: add new machine readable unix-style reporter (Andreas Tolfsen)
    • Reporters: add new summary reporter (oredi)

    πŸ› Bug fixes

    • βͺ Revert "New Rule: (disallow|require)SpaceBeforeSemicolon" (Oleg Gaidarenko)
    • πŸ‘» requireMultipleVarDecl: add exception for require statements (Stefano Sala)
    • πŸ”§ requirePaddingNewlinesAfterBlocks: initialize exceptions in configure (Eli White)
    • disallowSpaceAfterKeywords: fix "else if" case (Henry Zhu)
    • String-checker: do not check empty strings (Oleg Gaidarenko)
    • requirePaddingNewLinesAfterBlocks: fixing blocks that end with semicolons (Eli White)
    • disallowPaddingNewLinesAfterBlocks: fix blocks which end with semicolon (Oleg Gaidarenko)
    • πŸ‘ disallowSpaceAfterObjectKeys: support for legacy options (Andrey Ermakov)
    • requireAlignedObjectValues: do not assert exact amount of spaces before colons (Andrey Ermakov)
    • disallowImplicitTypeConversion: Don't report concat for same string literals (Oleg Gaidarenko)
    • disallowSpacesInCallExpression: Extend rule to validate NewExpression (Inian Parameshwaran)
    • Iterator: correct "TryStatement" path (Oleg Gaidarenko)
    • requirePaddingNewLinesAfterBlocks: consider IIFE case (Oleg Gaidarenko)
    • disallowKeywordsOnNewLine: Allow comments before keywords (oredi)

    πŸ“„ Docs

    • πŸ“„ Docs: last minutes updates for 2.0 (Oleg Gaidarenko)
    • πŸ“„ Docs: update rules sum (Oleg Gaidarenko)
    • πŸ“„ Docs: add es3 option to OVERVIEW.md (Oleg Gaidarenko)
    • πŸ“„ Docs: reflect some of the 2.0 changes (Oleg Gaidarenko)
    • πŸ“„ Docs: clarify space brackets rules description (Oleg Gaidarenko)
    • πŸ“„ Docs: Remove needless semicolon (yong woo jeon)
    • πŸ“„ Docs: fix diff range link for 1.13.1 version (Alexej Yaroshevich)
    • πŸ“„ Docs: add link to commits between minor releases in CHANGELOG (Henry Zhu)
    • πŸ“„ Docs: Document how to programmatically invoke jscs (K. Adam White)
    • πŸ“„ Docs: Add and improve docs for inline comments (oredi)
    • πŸ“„ Docs: add message about demo not working, fix link to team (Henry Zhu)
    • πŸ“„ Docs: Change label to beginner-friendly (oredi)
    • πŸ“„ Docs: Mention which tickets are beginner-friendly (Joel Kemp)
    • πŸ“„ Docs: add "allowEOLComments" option info for disallowMultipleSpaces rule (bigmonkeyboy)
    • πŸ“„ Docs: correct syntax error for disallowFunctionDeclarations rule (Christophe Hurpeau)
    • βœ… Misc: Docs: add docs and test for "esprima" config option (Oleg Gaidarenko)
    • πŸ“„ Docs: correct true value description (Adrian Heine nΓ© Lang)
    • πŸ“„ Docs: add quotes to the "wordpress" preset (raimon)
    • πŸ“„ Docs: align gitter badge with others (Oleg Gaidarenko)
    • πŸ“„ Docs: Add gitter room to readme (Joel Kemp)
    • πŸ“„ Docs: fix table of contents anchor links in contributing.md (Henry Zhu)
    • πŸ“„ Docs: add protocol to homepage address (Oleg Gaidarenko)
    • πŸ“„ Docs: update outdated info & fix small issue in jscs config (Oleg Gaidarenko)
    • πŸ“„ Docs: correct validateAlignedFunctionParameters values (Adrian Heine nΓ© Lang)
    • πŸ“„ Docs: various corrections for the rules page (Oleg Gaidarenko)
    • πŸ“š disallowPaddingNewlinesInObjects: Clarify documentation (Ángel Sanz)
    • πŸ“„ requireSpacesInAnonymousFunctionExpression: fix syntax error in docs (Christophe Hurpeau)

    Misc

    • Misc: add disallowTrailingComma rule to jscs config (Oleg Gaidarenko)
    • βœ… Tests: correct preset examples (Oleg Gaidarenko)
    • 🚚 Misc: use babel-jscs 2.0.0, move jscs-jsdoc to dependencies (Henry Zhu)
    • πŸ”€ Misc: remove merge artefact (Oleg Gaidarenko)
    • String-checker: make "fix" field private (Oleg Gaidarenko)
    • πŸ”§ Configuration: improve JSDoc notes (Oleg Gaidarenko)
    • String-checker: use "fix" field in rule declaration if it exist (Oleg Gaidarenko)
    • Errors: add "cast" method (Oleg Gaidarenko)
    • πŸ”§ Configuration: add "getConfiguredRule" method (Oleg Gaidarenko)
    • πŸ”§ Configuration: simplify and modulize configuration module (Oleg Gaidarenko)
    • βœ… Tests: do not define anything if test should not run (Oleg Gaidarenko)
    • ⚑️ Iterator: update to latest estraverse and don't monkeypatch (Oleg Gaidarenko)
    • Misc: Add node .12 and io.js to the travis (Oleg Gaidarenko)
    • πŸ‘ Misc: add support for babel-jscs (Henry Zhu)
    • Misc: bump estraverse to 2.x (Oleg Gaidarenko)
    • requireArrowFunctions: only error for callbacks (Henry Zhu)
    • 🚚 Tests: Move require-matching-function-name to spec folder (Joel Kemp)
    • πŸ”¨ requirePaddingNewlinesInBlocks: Refactor unit tests (oredi)
    • requirePaddingNewlinesBeforeKeywords: Modify special scenarios (oredi)
    • βœ… Tests: ES2015 Airbnb Preset (Christophe Hurpeau)
    • πŸ”¨ requireTemplateStrings: refactor, check if either node is a string (Henry Zhu)
    • ⚑️ Deps: Update JSHint and Lodash.assign (paladox)
    • πŸ‘Œ Improve JsFile constructor for better encapsulation (Marat Dulin)
    • πŸ”¨ Refactor integration tests (Marat Dulin)
    • 🚚 Misc: remove extraneous file (Henry Zhu)
    • Misc: increase coverage of remaining rules (Henry Zhu)
    • 0️⃣ disallowParenthesesAroundArrowParam: make exception when using a default parameter (Henry Zhu)
    • βœ… requireTemplateStrings: improve logic (Oleg Gaidarenko)
    • ⚑️ Misc: update dependencies (Henry Zhu)
    • πŸ‘ Misc: support class methods for various function rules (Henry Zhu)
    • βœ… Misc: fix test filename for disallowSpaceBeforeObjectValues (Henry Zhu)
    • βœ… Misc: add intergration tests for "autofix" feature (Oleg Gaidarenko)
    • βœ… Tests: correct couple assertions (Oleg Gaidarenko)
    • Misc: fix jsdoc types with non-standard Promise-star declaration (Alexej Yaroshevich)
    • πŸ‘• Lint: Add jscs-jsdoc plugin (Alexej Yaroshevich)
    • ⚑️ Misc: update dependencies & temporary remove coverage badge (Oleg Gaidarenko)
    • πŸ’… Misc: code style fixes (Alexej Yaroshevich)
    • Misc: introduce reservedWords instead of utils.isES3 (Alexej Yaroshevich)
    • βœ… Intergration: correct integration tests for big amount of results (Oleg Gaidarenko)
    • πŸ—„ validateIndentation: deprecate includeEmptyLines in favour of allExcept (Oleg Gaidarenko)
  • v1.13.1 Changes

    Overview

    ⚑️ Small update for fix distribution of the --esnext CLI option (#1321)

    πŸ› Bug fixes

    • πŸ”§ CLI: use "esnext" cli option in the configuration module (Oleg Gaidarenko)
    • CLI: ensure options to path.resolve are strings (Jason Karns)
    • πŸ”§ disallowMultipleSpaces: fix configuration error message (Marc Knaup)

    πŸ“„ Docs

    • πŸ“„ Docs: correct example for the "requireCapitalizedComments" rule (XhmikosR)
    • πŸ“„ Docs: Update mixup between rules in docstring example (JΓ©rΓ©mie Astori)
    • πŸ“„ Docs: Fix missing quotes in a docstring example (JΓ©rΓ©mie Astori)