Standard v9.0.0 Release Notes
Release Date: 2017-02-28 // about 7 years ago-
๐ It's time for a new major version of
standard
! As usual, this release contains a bunch of awesomeness to help you keep your code in tip-top shape!We've added several new rules designed to catch potential programmer errors (i.e. bugs), as well as rules to make programmer intent more explicit in certain circumstances.
๐ This release continues our trend of tightening up rules so that, wherever possible, there's one "right" way to do things. This design goal is intended to reduce the time that teams and maintainers spend giving code review feedback in pull requests.
โฌ๏ธ When you upgrade, consider running
standard --fix
to automatically fix some of the errors caught by the new rules in this version.โ Note: If you use the Chai test framework, you will need to make some changes to โ your tests to improve their robustness. Read about the changes you need to make.
๐ New features
- โก๏ธ Update ESLint from 3.10.x to 3.15.x
- 3 additional rules are now fixable with
standard --fix
๐ New rules
โ (Estimated % of affected standard users, based on test suite in parens)
- ๐ Disallow mixing different operators without parens (no-mixed-operators) #566 [5%]
- ๐ Enforce 1 newline at end of file (previously 1 or 2 were ok) (no-multiple-empty-lines) #733 [3%]
- ๐ Disallow Unused Expressions (no-unused-expressions) #690 [3%]
- Note: this affects users of the Chai test framework. Read about the changes you need to make.
- ๐ Disallow redundant return statements (no-useless-return) #694 [1%]
- ๐ Disallow Incorrect Early Use (no-use-before-define) #636 [0%]
- ๐ Enforce that Promise rejections are passed an Error object as a reason (prefer-promise-reject-errors) #777 [0%]
- ๐ Enforce comparing
typeof
expressions against string literals (valid-typeof) #629 [0%] - ๐ Enforce spacing around * in generator functions (generator-star-spacing) #724 [0%]
- ๐ Disallow Unnecessary Labels (no-extra-label) #736 [0%]
- ๐ Disallow spacing between template tags and their literals (template-tag-spacing) #755 [0%]
- ๐ Disallow padding within switch statements and classes (padded-blocks) #610 [0%]
- ๐ Enforce that Symbols are passed a description (symbol-description) #630 [0%]
๐ Changed rules
- ๐ Relax rule: allow TypeScript Triple-Slash Directives (spaced-comment) #660
- ๐ Relax rule: allow Flow Comments (spaced-comment) #661