Standard v6.0.0 Release Notes

Release Date: 2016-02-05 // over 8 years ago
  • πŸš€ The goal of this release is toΒ make standard faster to install, and simpler to use.

    βœ‚ Remove standard-format (#340) (#397)

    • πŸ“¦ Eliminates 250 packages, and cuts install time in half!
    • For npm 2, install time goes from 20 secs β€”> 10 secs.
    • For npm 3, install time goes from 24 secs β€”> 12 secs.
    • To continue using standard-format, just install it separately: npm install -g standard-format

    πŸ‘• React-specific linting rules are removed (#351) (#367) (eslint-config-standard-react/#13)

    • πŸ’… JSX is still supported, and it continues to be checked for style.
    • There were only a few React-specific rules, but they made it extremely difficult for users of alternatives like virtual-dom or deku, and unecessarily tied standard to a single library.
    • πŸ‘• JSX rules come from eslint-config-standard-jsx. The eslint-config-standard-react dependency was removed.

    πŸ†• New Rules

    πŸ“¦ The percentage (%) of users that rule changes will effect, based on real-world testing of the top ~400 npm packages is denoted in brackets.

    • Disallow __dirname/__filename string concatenation (#403) (no-path-concat) [5%]
    • πŸ‘• Require parens in arrow function arguments
 (#309) (arrow-parens) [5%]
    • Ensure that new Promise() is instantiated with the parameter names resolve, reject (#282) (promise/param-names) [1%]
    • πŸ‘• Enforce Usage of Spacing in Template Strings (template-curly-spacing) [1%]
    • πŸ‘• Template strings are only allowed when necessary, i.e. templateΒ string features are being used (eslint got stricter: eslint/eslint#5147) [1%]
    • πŸ‘ Better dead code detection after conditional statements (eslint got stricter) [1%]
    • Enforce spaces around * in yield * something (#335) (yield-star-spacing) [0%]
    • πŸ‘• Disallow labels on loops/switch statements too (made rule stricter) (no-labels) [0%]
    • πŸ‘• Disallow unnecessary constructor (no-useless-constructor) [0%]
    • πŸ‘• Disallow empty destructuring patterns (no-empty-pattern) [0%]
    • πŸ‘• Disallow Symbol Constructor (no-new-symbol) [0%]
    • πŸ‘• Disallow Self Assignment (no-self-assign) [0%]

    βœ‚ Removed Rules

    • πŸ‘• parseInt() radix rule because ES5 fixes this issue (#384)
 (radix) [0%]

    πŸ”¦ Expose eslint configuration via command line options and package.json

    For power users, it might be easier to use one of these new hooks instead of forking standard, though that's still encouraged, too!

    • πŸ‘• Set eslint "plugins" (#386)
    • πŸ‘• Set eslint "rules" (#367)
    • πŸ‘• Set eslint "env" (#371)

    πŸ‘• To set custom ESLint plugins, rules, or envs, use the command line --plugin, --rules, and --env flags.

    πŸ“¦ In package.json, use the "standard" property:

    {
      "standard": {
        "plugins": [ "my-plugin" ]
      }
    }
    

    ⬆️ Upgrade to ESLint v2

    • 🚚 There may be slight behavior changes to existing rules. When possible, we've noted these in the "New Rules" and "Removed Rules" section.

    πŸ‘Œ Improve test suite

    • πŸ“¦ Rule changes can be tested against every package on npm. For sanity, this is limited to packages with at least 4 dependents. Around 400 packages.

    Known Issues

    • πŸš€ Using prerelease eslint version (2.0.0-rc.0). There may be breaking changes before the stable release.
    • πŸ‘• no-return-assign behavior changed with arrow functions (eslint/eslint#5150)

    Relevant diffs