Skip to content

Latest commit

 

History

History
52 lines (28 loc) · 2.35 KB

migrating-to-6.0.0.md

File metadata and controls

52 lines (28 loc) · 2.35 KB

Migrating to v6.0.0

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.

Breaking changes for users

Breaking changes for plugin/custom rule developers

Breaking changes for integration developers


no-redeclare rule now checks the redeclarations by /* globals */ directive comments

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.

no-redeclare rule now checks the redeclarations with built-in globals by default

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.


variable.eslintExplicitGlobalComment property was removed

Undocumented variable.eslintExplicitGlobalComment property, only no-unused-vars rule had used it, was removed.

To address: Please use variable.eslintExplicitGlobalComments property instead.