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

Bump eslint plugins #179

Merged
merged 8 commits into from Sep 11, 2020
Merged

Bump eslint plugins #179

merged 8 commits into from Sep 11, 2020

Conversation

BPScott
Copy link
Member

@BPScott BPScott commented Sep 10, 2020

Fixed: #161

Preps for the latest major version of TS tooling, and sets the stage for
ESLint 7 updates, supporting optional-chaining

Major bumps are:

  • @typescript-eslint/eslint-plugin to 4.1.0
  • eslint-plugin-graphql to 4.0.0
  • eslint-plugin-jest to 24.0.0

Preps for the latest major version of TS tooling, and sets the stage for
ESLint 7 updates, supporting optional-chaining

Major bumps are:

- @typescript-eslint/eslint-plugin to 4.1.0
- eslint-plugin-graphql to 4.0.0
- eslint-plugin-jest to 24.0.0
 - @shopify/eslint-plugin@38.1.0-beta.1
 - @shopify/eslint-plugin@38.1.0-beta.2
@atesgoral atesgoral requested a review from a team September 11, 2020 03:06
'error',
{ignoreRhs: true},
],
'@typescript-eslint/no-unnecessary-condition': ['error'],
Copy link
Member Author

Choose a reason for hiding this comment

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

The ignoreRhs was removed

@@ -44,7 +44,7 @@ module.exports = {
// Disallow setup and teardown hooks
'jest/no-hooks': 'off',
// Using a callback in asynchronous tests
'jest/no-test-callback': 'error',
'jest/no-done-callback': 'error',
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

jest/no-try-expect is deprecated in favor of jest/no-conditional-expect

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add those new rules

  • jest/no-interpolation-in-snapshots
  • jest/no-deprecated-functions

Copy link
Member Author

Choose a reason for hiding this comment

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

They seem reasonable, good spot

"eslint-plugin-graphql": "3.1.1",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-graphql": "4.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just double-checking, this version only supports Node.js 10.

Copy link
Member Author

Choose a reason for hiding this comment

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

This plugin only supports node 10 since we moved to typescript-eslint/eslint-plugin v3 (which dropped support for node 8) so this doesn't affect our version support :)

yarn.lock Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
@BPScott
Copy link
Member Author

BPScott commented Sep 11, 2020

https://github.com/Shopify/web/pull/31363 is a web PR that contains these changes. The lint report is at https://buildkite.com/shopify/web-ci-builder/builds/244536#b110f57c-5714-43d6-97c1-5c04a6b2de1f

444 new linting errors are introduced.

  • 181 due to the introduction of jest/no-deprecated-functions and can be trivially fixed by replacing "require.THING" with "jest.THING".
  • 133 due to babel/no-unused-expressions no liking the usage of optional chaining. This is somewhat annoying but updating ESLint to >= 7.5 (which adds optional chaining support) should fix them
  • 52 due to @typescript-eslint/naming-convention changes already introduced in prior PRs
  • 27 due to us removing @typescript-eslint/camelcase usage in favor of @typescript-eslint/naming-convention
  • 29 due to react/no-unused-prop-types

@BPScott BPScott merged commit c8035b0 into main Sep 11, 2020
@BPScott BPScott deleted the eslint-plugin-bumps branch September 11, 2020 19:04
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.

Update eslint-plugin-react-hooks to 4.0.4
2 participants