6.0.0 Release
- New rules were added, which could potentially break builds.
- Requires node
10
or higher. - Requires eslint
7.22.0
or higher.
- Adds automatic configuration of your babel config for
@babel/eslint-parser
. - Adds new environments.
commonjs
shared-node-browser
- Adds reporting of unused
eslint-disable
comments. - Adds better browser global support.
- Adds rules.
- eslint/default-case-last
- eslint/default-param-last
- eslint/grouped-accessor-pairs
- eslint/no-dupe-else-if
- eslint/no-invalid-this
- eslint/no-loss-of-precision
- eslint/no-nonoctal-decimal-escape
- eslint/no-promise-executor-return
- eslint/no-restricted-imports
- Disallows
moment
.
- Disallows
- eslint/no-setter-return
- eslint/no-unreachable-loop
- eslint/no-unsafe-optional-chaining
- eslint/no-useless-backreference
- eslint/prefer-exponentiation-operator
- eslint/prefer-named-capture-group
- eslint/prefer-regex-literals
- import/group-exports
- jest/expect-expect
- jest/no-conditional-expect
- jest/no-deprecated-functions
- jest/no-done-callback
- jest/no-interpolation-in-snapshots
- jest/no-restricted-matchers
- jest/prefer-hooks-on-top
- jest/valid-title
- jsx-a11y/autocomplete-valid
- node/callback-return
- node/handle-callback-err
- node/no-callback-literal
- node/no-exports-assign
- node/no-new-require
- node/no-path-concat
- node/no-process-exit
- node/no-sync
- node/prefer-promises/dns
- node/prefer-promises/fs
- react-native/no-single-element-style-arrays
- react/function-component-definition
- react/jsx-curly-brace-presence
- react/jsx-no-constructed-context-values
- react/jsx-no-script-url
- react/jsx-sort-default-props
- react/no-adjacent-inline-elements
- unicorn/better-regex
- unicorn/consistent-destructuring
- unicorn/consistent-function-scoping
- unicorn/empty-brace-spaces
- unicorn/filename-case
- unicorn/no-array-push-push
- unicorn/no-instanceof-array
- unicorn/no-lonely-if
- unicorn/no-nested-ternary
- unicorn/no-new-array
- unicorn/no-null
- unicorn/no-object-as-default-parameter
- unicorn/no-process-exit
- unicorn/no-this-assignment
- unicorn/prefer-array-find
- unicorn/prefer-array-flat-map
- unicorn/prefer-array-some
- unicorn/prefer-date-now
- unicorn/prefer-default-parameters
- unicorn/prefer-dom-node-append
- unicorn/prefer-dom-node-dataset
- unicorn/prefer-dom-node-remove
- unicorn/prefer-dom-node-text-content
- unicorn/prefer-keyboard-event-key
- unicorn/prefer-math-trunc
- unicorn/prefer-negative-index
- unicorn/prefer-number-properties
- unicorn/prefer-optional-catch-binding
- unicorn/prefer-regexp-test
- unicorn/prefer-set-has
- unicorn/prefer-spread
- unicorn/prefer-string-replace-all
- unicorn/prefer-string-slice
- unicorn/prefer-string-starts-ends-with
- unicorn/prefer-string-trim-start-end
- unicorn/prefer-ternary
- unicorn/string-content
- Checks for
http
and recommendshttps
.
- Checks for
- Changes
babel-eslint
to@babel/eslint-parser
. - Changes
ecmaVersion
from2020
to2021
. - Changes rule options.
- eslint/accessor-pairs
- Adds
getWithoutSet
option.
- Adds
- eslint/camelcase
- Adds
ignoreImports
option.
- Adds
- eslint/no-implicit-globals
- Adds
lexicalBindings
option.
- Adds
- eslint/no-unsafe-negation
- Adds
enforceForOrderingRelations
option.
- Adds
- eslint/no-useless-computed-key
- Adds
enforceForClassMembers
option.
- Adds
- import/no-unresolved
- Adds
amd
andcommonjs
options.
- Adds
- react/jsx-key
- Adds
checkKeyMustBeforeSpread
option.
- Adds
- react/jsx-no-target-blank
- Adds
warnOnSpreadAttributes
option.
- Adds
- eslint/accessor-pairs
- Fixes sporadic
eslint couldn't find the plugin
errors (see eslint/eslint#3458 for more information).
- Removes plugins.
- eslint-plugin-babel
- It was replaced with @babel/eslint-plugin, but the rules it's meant to override are not configurable in the same way. For example, the
@babel/new-cap
rule does not have acapIsNewExceptions
option like the base eslint rule.
- It was replaced with @babel/eslint-plugin, but the rules it's meant to override are not configurable in the same way. For example, the
- eslint-plugin-babel
- Removes rules.
- eslint/callback-return
- Replaced by
node/callback-return
.
- Replaced by
- eslint/handle-callback-err
- Replaced by
node/handle-callback-err
.
- Replaced by
- eslint/multiline-comment-style
- We're over it. 🙄
- eslint/no-nested-ternary
- Replaced by
unicorn/prefer-ternary
.
- Replaced by
- eslint/no-new-require
- Replaced by
node/no-new-require
.
- Replaced by
- eslint/no-path-concat
- Replaced by
node/no-path-concat
.
- Replaced by
- eslint/no-process-exit
- Replaced by
unicorn/no-process-exit
.
- Replaced by
- jest/no-empty-title
- Replaced by
jest/valid-title
.
- Replaced by
- jest/no-expect-resolves
- Replaced by
jest/no-restricted-matchers
.
- Replaced by
- jest/no-test-callback
- Renamed to
jest/no-done-callback
.
- Renamed to
- jest/no-truthy-falsy
- Replaced by
jest/no-restricted-matchers
.
- Replaced by
- jest/no-try-expect
- Replaced by
jest/no-conditional-expect
.
- Replaced by
- react/jsx-no-literals
- Replaced by
react/jsx-curly-brace-presence
.
- Replaced by
- unicorn/no-array-instanceof
- Renamed to
unicorn/no-instanceof-array
.
- Renamed to
- unicorn/prefer-event-key
- Renamed to
unicorn/prefer-keyboard-event-key
.
- Renamed to
- unicorn/prefer-flat-map
- Renamed to
unicorn/prefer-array-flat-map
.
- Renamed to
- unicorn/prefer-node-append
- Renamed to
unicorn/prefer-dom-node-append
.
- Renamed to
- unicorn/prefer-node-remove
- Renamed to
unicorn/prefer-dom-node-remove
.
- Renamed to
- unicorn/prefer-starts-ends-with
- Renamed to
unicorn/prefer-string-starts-ends-with
.
- Renamed to
- unicorn/prefer-text-content
- Renamed to
unicorn/prefer-dom-node-text-content
.
- Renamed to
- unicorn/regex-shorthand
- Renamed to
unicorn/better-regex
.
- Renamed to
- eslint/callback-return