Skip to content

v0.4.0 – ESLint v7

Compare
Choose a tag to compare
@thibaudcolas thibaudcolas released this 15 Jul 06:35
· 200 commits to main since this release

0.4.0 (2021-07-15)

Features

  • Update to ESLint v7 and eslint-config-airbnb v18.2.1, changing rules that are applied with this config.
  • Update to eslint-config-prettier v8, which no longer requires specifying sub-configurations separately for different frameworks or syntaxes.

Here is a summary of significant rule changes:

jsx-a11y/aria-role (https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md):
-`error, ignoreNonDom: false`
+`error, ignoreNonDOM: false`
react/sort-comp (https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md):
-`error, order: static-methods, instance-variables, lifecycle,…`
+`error, order: static-variables, static-methods, instance-var…`
react/jsx-props-no-spreading (https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md):
-`error, html: enforce, custom: enforce, exceptions:`
+`error, html: enforce, custom: enforce, explicitSpread: ignore`
import/order (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md):
-`error, groups: builtin, external, internal`
+`error, groups: builtin, external, internal, warnOnUnassigned…`
import/no-cycle (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-cycle.md):
-`error, maxDepth: null`
+`error, maxDepth: ∞, ignoreExternal: false`
import/no-useless-path-segments (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md)
- `error`
+`error, commonjs: true`
array-callback-return (https://eslint.org/docs/rules/array-callback-return):
-`error, allowImplicit: true`
+`error, allowImplicit: true, checkForEach: false`

No longer enforced:

- jsx-a11y/accessible-emoji (https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md) (deprecated)

BREAKING CHANGES

This release updates most of the dependencies of the config:

package from to
eslint ^6.0.0 ^7.2.0
eslint-config-airbnb ^18.0.0 ^18.2.1
eslint-config-prettier ^6.0.0 ^8.3.0
eslint-plugin-react ^7.16.0 ^7.24.0
eslint-plugin-react-hooks ^1.7.0 ^4.2.0
eslint-plugin-jsx-a11y ^6.2.0 ^6.4.1
eslint-plugin-import ^2.18.0 ^2.23.4

Users of npm v7 can npm install --save-dev eslint-config-torchbox@latest and this will automatically install all required peer dependencies.

For older versions of npm, use npx install-peerdeps --dev eslint-config-torchbox@latest so all other peerDependencies are updated as well.