ESLint v6.0.0 is the fifth major version release. We have made a few breaking changes in this release, but we expect that most users will be able to upgrade without any modifications to their build. This guide is intended to walk you through the breaking changes.
The lists below are ordered roughly by the number of users each change is expected to affect, where the first items are expected to affect the most users.
no-redeclare
rule now checks the redeclarations by/* globals */
directive commentsno-redeclare
rule now checks the redeclarations with built-in globals by default
no-redeclare rule reports the following cases newly:
- Your config file defined a global variable but there is
/* globals */
directive comment of the defined global variable in your source code. - There are multiple
/* globals */
directive comments for the same variable.
To address: Please remove the redundant /* globals */
directive comments.
The builtinGlobals
option of no-redeclare rule is true
by default. Previously, it was false
by default.
To address: Please remove the redundant declarations or disable builtinGlobals
option manually.
Undocumented variable.eslintExplicitGlobalComment
property, only no-unused-vars rule had used it, was removed.
To address: Please use variable.eslintExplicitGlobalComments
property instead.