7.0.0-beta.1 Release
Pre-release
Pre-release
- New rules were added, which could potentially break builds.
- Requires node
12.20.0
or higher. - Requires eslint
8.4.1
or higher.
- Adds
Link
as an ESLint shared settinglinkComponents
.- Helps support routing framworks, like Next.js (see eslint-plugin-react's custom link components for more information).
- Adds
.json5
and.jsonc
as supported extensions. - Adds plugins.
- Adds rules.
- eslint/dot-location
- eslint/no-multi-assign
- eslint/no-unused-private-class-members
- import/no-import-module-exports
- import/no-relative-packages
- jest/prefer-to-be
- jest/prefer-expect-resolves
- jest/valid-describe-callback
- react/no-arrow-function-lifecycle
- react/no-invalid-html-attribute
- react/no-namespace
- react/no-unstable-nested-components
- unicorn/no-array-method-this-argument
- unicorn/no-array-reduce
- unicorn/no-await-expression-member
- unicorn/no-document-cookie
- unicorn/no-empty-file
- unicorn/no-invalid-remove-event-listener
- unicorn/no-static-only-class
- unicorn/no-useless-fallback-in-spread
- unicorn/no-useless-length-check
- unicorn/no-useless-spread
- unicorn/numeric-separators-style
- unicorn/prefer-array-flat
- unicorn/prefer-at
- unicorn/prefer-code-point
- unicorn/prefer-export-from
- unicorn/prefer-object-from-entries
- unicorn/prefer-object-has-own
- unicorn/prefer-prototype-methods
- unicorn/require-array-join-separator
- unicorn/require-number-to-fixed-digits-argument
- unicorn/require-post-message-target-origin
- unicorn/template-indent
- unicorn/prefer-node-protocol
- Only enabled for node versions
14.18.0
or higher.
- Only enabled for node versions
- Changes
ecmaVersion
tolatest
- Saves us from having to manually bump it every year (see ESLint's Parser Options for more information).
- Changes which React rules are enabled if version
17.0.0
or higher.- The react/jsx-uses-react and react/react-in-jsx-scope rules will be disabled if React's version is
17.0.0
and above as they are no longer necessary (see Introducing the New JSX Transform for more information).
- The react/jsx-uses-react and react/react-in-jsx-scope rules will be disabled if React's version is
- Changes rule options.
- eslint/comma-dangle
- Adds
always
option. Makes git diffs easier to understand.
- Adds
- eslint/no-implicit-coercion
- Adds
disallowTemplateShorthand
option.
- Adds
- import/no-unresolved
- Adds
caseSensitive
andcaseSensitiveStrict
options.
- Adds
- import/order
- Adds
warnOnUnassignedImports
option.
- Adds
- react/jsx-filename-extension
- Changes
extensions
from.js
to.jsx
to more explicitly call out which files contain React and which files are pure JavaScript.
- Changes
- react/jsx-no-target-blank
- Adds
forms
option.
- Adds
- eslint/comma-dangle
- Removes plugins.
- eslint-plugin-json
- Replaced by eslint-plugin-jsonc, as
eslint-plugin-json
uses a non-standard preprocessor (it's using vscode-json-languageservice) and currently returns an empty string, which makes it difficult for other plugins to work alongside of it (see azeemba/eslint-plugin-json#38 for more information).eslint-plugin-jsonc
uses the standard ESLint parser espree to create compliant, and thus harmonious, AST.
- Replaced by eslint-plugin-jsonc, as
- eslint-plugin-json
- Removes rules.
- eslint/lines-between-class-members
- Messed with the
exceptAfterSingleLine
option, but ultimately couldn't find a combination we liked, so we're removing it.
- Messed with the
jest/prefer-to-be-null
- Replaced by jest/prefer-to-be.
jest/prefer-to-be-undefined
- Replaced by jest/prefer-to-be.
jest/valid-describe
- Replaced by jest/valid-describe-callback.
- eslint/lines-between-class-members