ESLint v7.0.0-alpha.3 released
by Kai Cataldo - 27 March 2020We just pushed ESLint v7.0.0-alpha.3, 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
This release contains the following breaking changes:
- Making RuleTester checks stricter.
- Plugins are now loaded relative to the configs that reference them.
- Use the current working directory as base path when using
--config
.
It also adds support for the following new language features:
- Core rules now support
globalThis
.
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.3 --save-dev
Migration Guide
As there are a lot of changes, we've created 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
78c8cda
Breaking: RuleTester Improvements (refs eslint/rfcs#25) (#12955) (Milos Djermanovic)185982d
Breaking: improve plugin resolving (refs eslint/rfcs#47) (#12922) (Toru Nagashima)48b122f
Breaking: change relative paths with --config (refs eslint/rfcs#37) (#12887) (Toru Nagashima)
Enhancements
e0f1b6c
Update: stricter array index check in no-magic-numbers (fixes #12845) (#12851) (Milos Djermanovic)362713c
Update: Improve report location for template-curly-spacing (#12813) (Milos Djermanovic)105384c
Update: report operator location in operator-linebreak (refs #12334) (#13102) (Milos Djermanovic)081e240
Update: support globalThis in no-implied-eval (fixes #12670) (#13105) (YeonJuan)a1370ab
Update: Report constructor calls in no-obj-calls (#12909) (Milos Djermanovic)085979f
Update: consider env in no-implied-eval (fixes #12733) (#12757) (YeonJuan)e90b29b
Update: Allow testing Suggestions with data in RuleTester (fixes #12606) (#12635) (Milos Djermanovic)183e300
Update: support globalThis (refs #12670) (#12774) (YeonJuan)1299705
Update: acorn version (#13016) (Idan Avrahami)
Bug Fixes
29f32db
Fix: Change error message logic for implicit file ignore (fixes #12873) (#12878) (Scott Hardin)eb1a43c
Fix: require-await ignore async generators (fixes #12459) (#13048) (Anix)920465b
Fix: getNameLocationInGlobalDirectiveComment end location (refs #12334) (#13086) (Milos Djermanovic)ae14a02
Fix: add end location to report in no-extra-bind (refs #12334) (#13083) (Milos Djermanovic)0c20bc0
Fix: check assignment property target in camelcase (fixes #13025) (#13027) (YeonJuan)8d50a7d
Fix: add end location to report in no-prototype-builtins (refs #12334) (#13087) (Milos Djermanovic)3e4e7f8
Fix: incorrect logic for required parens in no-extra-boolean-cast fixer (#13061) (Milos Djermanovic)aef9488
Fix: allow references to external globals in id-blacklist (fixes #12567) (#12987) (Milos Djermanovic)4955c50
Fix: remove type arguments in prefer-object-spread (fixes #13058) (#13063) (Milos Djermanovic)dbe357d
Fix: check template literal in prefer-numeric-literals (fixes #13045) (#13046) (YeonJuan)2260611
Fix: added async in allow method in no-empty-function (fixes #12768) (#13036) (Anix)7224eee
Fix: no-plusplus allow comma operands in for afterthought (fixes #13005) (#13024) (Milos Djermanovic)7598cf8
Fix: Newline before eof when creating config via --init (#12952) (Andreas Lind)0243549
Fix: camelcase false positive with computed property (fixes #13022) (#13023) (Milos Djermanovic)6cef0d5
Fix: Check division operator in astUtils.canTokensBeAdjacent (#12879) (Milos Djermanovic)
Documentation
6c069f9
Docs: Add comments to code block in example (#13089) (Kibeom Kwon)ee1f053
Docs: Fix typo (#13092) (Max Coplan)76324ac
Docs: Add further reading to rule (#13084) (Max Coplan)3f7c9bf
Docs: clarify variables option in no-use-before-define (fixes #12986) (#13017) (Anix)9ac5b9e
Docs: Clarify node_modules is ignored by default (fixes #13006) (#13054) (Mika Kuijpers)0de91f3
Docs: removed correct code from incorrect eg (#13060) (Anix)af7af9d
Docs: Update governance (#13055) (Nicholas C. Zakas)79ac6cd
Docs: added less confusing explanation for func-style (fixes #12900) (#13004) (Anix)
Dependency Upgrades
2111c52
Upgrade: esquery@1.2.0 (#13076) (Milos Djermanovic)95613d4
Upgrade: espree@6.2.1 (#13026) (Kai Cataldo)