Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ESLint v8 #305

Merged
merged 6 commits into from
Nov 30, 2021
Merged

Support ESLint v8 #305

merged 6 commits into from
Nov 30, 2021

Conversation

BPScott
Copy link
Member

@BPScott BPScott commented Nov 29, 2021

Description

Fixes #300

Updates @shopify/eslint-plugin to support eslint v8.

  • Increase peer dependency on eslint from ^7.30.0 to ^8.3.0
  • Increase node version to run on CI to 12.22, as that is the minimum version that eslint requires.
  • Replace usage of the long-deprecated babel-eslint and eslint-plugin-babel with @babel/eslint-parser and @babel/eslint-plugin.
    • Update babel/* rules to @babel/*
    • Remove babel/camelcase and babel/valid-typeof rules as they do not exist in @babel/eslint-plugin.
    • Update setting parsers from babel-eslint to @babel/eslint-parser
    • Update usage of ClassProperty ast type to also check for PropertyDefinition
  • Update versions of all plugins. Note major version bumps to eslint-plugin-jest and typescript-eslint/* and eslint-plugin-prettier which caused the following changes:
  • Remove jest/prefer-inline-snapshots rule
  • Replace jest/prefer-to-be-null and jest/prefer-to-be-undefined and jest/no-expect-resolves rules with jest/prefer-to-be and jest/no-restricted-matchers
  • Rename jest/valid-describe rule to jest/valid-describe-callback
  • Rename jest/lowercase-name rule to jest/prefer-lowercase-title
Package Old version New version
typescript-eslint/eslint-plugin ^4.28.2 ^5.4.0
typescript-eslint/parser ^4.28.2 ^5.4.0
eslint-plugin-import ^2.23.4 ^2.25.3
eslint-plugin-jest ^24.3.6 ^25.3.0
eslint-plugin-jest-formatting ^3.0.0 ^3.1.0
eslint-plugin-jsx-a11y ^6.4.1 ^6.5.0
eslint-plugin-prettier ^3.4.0 ^4.0.0
eslint-plugin-promise ^5.1.0 ^5.1.1
eslint-plugin-react ^7.24.0 ^7.27.1
eslint-plugin-react-hooks ^4.2.0 ^4.3.0
eslint-plugin-sort-class-members ^1.11.0 ^1.14.0

Type of change

  • eslint-plugin: Major

- Replace babel-eslint with @babel/eslint-parser
- Replace eslin-plugin-babel with @babel/eslint-plugin
@BPScott BPScott changed the title Eslint8 Support ESLint v8 Nov 29, 2021
@BPScott BPScott requested review from vsumner and dahukish and removed request for vsumner November 30, 2021 18:16
Copy link
Contributor

@vsumner vsumner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Looks like a few dedupe opportunities in the lock file, but all the code makes sense.

yarn.lock Outdated
@@ -2582,6 +2592,11 @@ acorn@^8.2.4:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c"
integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==

acorn@^8.6.0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

yarn.lock Outdated Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
@BPScott BPScott merged commit d161346 into main Nov 30, 2021
@BPScott BPScott deleted the eslint8 branch November 30, 2021 19:16
@fortmarek
Copy link

Hey @BPScott - is there a possibility of a new release, so we can start using this? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eslint v8 support
3 participants