ESLint v7.0.0-alpha.0 released
by Brandon Mills - 17 January 2020We just pushed ESLint v7.0.0-alpha.0, which is a major release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release. This release also has some breaking changes, so please read the following closely.
Highlights
Most of the highlights of this release are breaking changes, and are discussed further in the migration guide.
In addition to the breaking changes, we have three new rules:
Installing
Since this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next
tag when installing:
npm i eslint@next --save-dev
You can also specify the version directly:
npm i eslint@7.0.0-alpha.0 --save-dev
Migration Guide
As there are a lot of changes, we're working on a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.
Breaking Changes
1aa021d
Breaking: lintoverrides
files (fixes #10828, refs eslint/rfcs#20) (#12677) (Toru Nagashima)b50179d
Breaking: Check assignment targets in no-extra-parens (#12490) (Milos Djermanovic)d86a5bb
Breaking: Check flatMap in array-callback-return (fixes #12235) (#12765) (Milos Djermanovic)cf46df7
Breaking: description in directive comments (refs eslint/rfcs#33) (#12699) (Toru Nagashima)7350589
Breaking: some rules recognize bigint literals (fixes #11803) (#12701) (Toru Nagashima)1118fce
Breaking: runtime-deprecation on '~/.eslintrc' (refs eslint/rfcs#32) (#12678) (Toru Nagashima)2c28fbb
Breaking: drop Node.js 8 support (refs eslint/rfcs#44) (#12700) (Toru Nagashima)
Features
f9774ec
New: Add default-case-last rule (fixes #12665) (#12668) (Milos Djermanovic)a1d999c
New: Add no-useless-backreference rule (fixes #12673) (#12690) (Milos Djermanovic)985dac3
New: Add no-restricted-exports rule (fixes #10428) (#12546) (Milos Djermanovic)
Enhancements
e59d775
Update: Separate pattern/expression options for array-element-newline (#11796) (jacobparish)f8f115a
Update: treat comment tokens in template-curly-spacing (fixes #12744) (#12775) (YeonJuan)9a93d9e
Update: fix no-restricted-imports export * false negative (fixes #12737) (#12798) (Milos Djermanovic)68becbd
Update: fix no-restricted-imports importNames reporting (fixes #12282) (#12711) (Andrey Alexandrov)ae959b6
Update: report double extra parens in no-extra-parens (fixes #12127) (#12697) (YeonJuan)b2c6209
Update: fix no-extra-parens CallExpression#callee false negatives (#12743) (Milos Djermanovic)14b42c3
Update: fix counting jsx comment len in max-len (fixes #12213) (#12661) (YeonJuan)313f70a
Update: add outerIIFEBody: "off" to indent rule (fixes #11377) (#12706) (Kai Cataldo)3fa39a6
Update: Handle locally unsupported regex in computed property keys (#12056) (Milos Djermanovic)8f1020f
Update: no-void add an option to allow void as a statement (#12613) (Brad Zacher)bb6cf50
Update: Add offsetTernaryExpressions option for indent rule (#12556) (Adam Stankiewicz)
Bug Fixes
de4fa7c
Fix: wrong indent at tagged template in indent (fixes #12122) (#12596) (YeonJuan)16a1c1f
Fix: prefer-object-spread false positives with accessors (fixes #12086) (#12784) (Milos Djermanovic)0d8c0af
Fix: improve report location for computed-property-spacing (#12795) (Milos Djermanovic)756b95d
Fix: id-blacklist should ignore ObjectPatterns (fixes #12787) (#12792) (JP Ramassini)01ff791
Fix: Display pipe character correctly in test output (#12771) (Brad Zacher)00ddfff
Fix: Windows path parsing for JUnit (fixes #12507) (#12509) (Michael Wall)1aff21b
Fix: no-mixed-spaces-and-tabs reports multiline strings (#12566) (Milos Djermanovic)
Documentation
02fcc05
Docs: Improve sort-keys (#12791) (Steven Vachon)25eb703
Docs: fix dead link in max-lines rule docs (#12766) (Christian Bundy)098b67d
Docs: fix minor typo in brace-style.md (#12749) (Marko Kaznovac)b23ad0d
Docs: change a broken link in working-with-rules.md (#12732) (Damien Cassou)
Dependency Upgrades
Build Related
4e16957
Build: update browser build (#12693) (Toru Nagashima)827259e
Build: package.json update for eslint-config-eslint release (ESLint Jenkins)
Chores
561b6d4
Chore: add prerequisites checklist to PR template (#12790) (Kai Cataldo)9dfc850
Chore: Refactor to use messageId in a number of rules (#12715) (Brad Zacher)b77b858
Chore: fix separateRequires tests for one-var rule (#12709) (Milos Djermanovic)e4df7df
Chore: add JSDoc types for RuleTester test cases (#12325) (Chiawen Chen)4744397
Chore: remove unused code in max-lines-per-function (#12659) (YeonJuan)39f5a45
Chore: add test cases for for-direction (#12698) (YeonJuan)b340304
Chore: Add extra test, improve docs (#12492) (Kevin Partington)