ESLint v3.19.0 released
by Brandon Mills - 31 March 2017We just pushed ESLint v3.19.0, which is a minor release upgrade of ESLint. This release adds a new feature and fixes several bugs found in the previous release.
Highlights
Building on the release of AST selectors in v3.18.0, no-restricted-syntax now supports custom error messages:
{
"rules": {
"no-restricted-syntax": [
"error",
{
"selector": "CallExpression[callee.name='setTimeout'][arguments.length!=2]",
"message": "setTimeout must always be invoked with two arguments."
}
]
}
}
Autofix is now more reliable thanks to nine individual fixes in this release.
Enhancements
- 91baed4 Update: allow custom messages in no-restricted-syntax (fixes #8298) (#8357) (Vitor Balocco)
Bug Fixes
- e09132f Fix: no-extra-parens false positive with exports and object literals (#8359) (Teddy Katz)
- 35c93e6 Fix: prevent space-before-function-paren from checking type annotations (#8349) (Teddy Katz)
- 3342e9f Fix: don't modify operator precedence in operator-assignment autofixer (#8358) (Teddy Katz)
- 155424c Fix: ignore empty path in patterns (fixes #8362) (#8364) (alberto)
- 27616a8 Fix: prefer-const false positive with object spread (fixes #8187) (#8297) (Vitor Balocco)
- 1b1046b Fix: don't classify plugins that throw errors as "missing" (fixes #6874) (#8323) (Teddy Katz)
- 29f4ba5 Fix: no-useless-computed-key invalid autofix for getters and setters (#8335) (Teddy Katz)
- 0541eaf Fix: no-implicit-coercion invalid autofix with consecutive identifiers (#8340) (Teddy Katz)
- 41b9786 Fix: no-extra-parens false positive with objects following arrows (#8339) (Teddy Katz)
- 3146167 Fix:
eslint.verify
should not mutate config argument (fixes #8329) (#8334) (alberto) - 927de90 Fix: dot-notation autofix produces invalid syntax for integer properties (#8332) (Teddy Katz)
- a9d1bea Fix: comma-style autofix produces errors on parenthesized elements (#8331) (Teddy Katz)
- d52173f Fix: don't generate invalid options in config-rule (#8326) (Teddy Katz)
- 6eda3b5 Fix: no-extra-parens invalid autofix in for-of statements (#8337) (Teddy Katz)
- 6c819d8 Fix: dot-notation autofix produces errors on parenthesized computed keys (#8330) (Teddy Katz)
- 2d883d7 Fix: object-shorthand autofix produces errors on parenthesized functions (#8328) (Teddy Katz)
- cd9b774 Fix: quotes false positive with backtick option in method names (#8327) (Teddy Katz)
- d064ba2 Fix: no-else-return false positive for ifs in single-statement position (#8338) (Teddy Katz)
- 2f144ca Fix: operator-assignment autofix errors with parentheses (fixes #8293) (#8294) (Teddy Katz)
- ddc6350 Fix: no-param-reassign false positive on destructuring (fixes #8279) (#8281) (Teddy Katz)
Documentation
- f88375f Docs: clarify that no-unsafe-negation is in eslint:recommended (#8371) (Teddy Katz)
- 02f0d27 Docs: Add soda0289 to Development Team (#8367) (Kai Cataldo)
- 8569a90 Docs: add note about git's linebreak handling to linebreak-style docs (#8361) (Teddy Katz)
- 602e9c2 Docs: fix incorrect selector examples (#8278) (Teddy Katz)
Dependency Upgrades
- 79a97cb Upgrade: devDependencies (#8303) (alberto)
- e4da200 Upgrade: Mocha to 3.2.0 (#8299) (Ilya Volodin)
Chores
- 5878593 Chore: fix invalid syntax in no-param-reassign test (#8360) (Teddy Katz)
- 6a718ba Chore: enable max-statements-per-line on ESLint codebase (#8321) (Teddy Katz)
- 614b62e Chore: update sinon calls to deprecated API. (#8310) (alberto)
- 0491572 Chore: use precalculated counts in codeframe formatter (#8296) (Vitor Balocco)
- 8733e6a Chore: Fix incorrect error location properties in tests (#8307) (alberto)
- c4ffb49 Chore: Fix typos in test option assertions (#8305) (Teddy Katz)
- 7521cd5 Chore: update token logic in rules to use ast-utils (#8288) (Teddy Katz)
- 9b509ce Chore: refactor space-before-function-paren rule (#8284) (Teddy Katz)
- f8176b3 Chore: improve test coverage for node-event-generator (#8287) (Teddy Katz)