Skip to content

[eslint-plugin] Support ESLint 8 - #3057

Merged
Ian Clanton-Thuon (iclanton) merged 17 commits into
microsoft:masterfrom
D4N14L:user/danade/eslint8
Dec 6, 2021
Merged

[eslint-plugin] Support ESLint 8#3057
Ian Clanton-Thuon (iclanton) merged 17 commits into
microsoft:masterfrom
D4N14L:user/danade/eslint8

Conversation

@D4N14L

@D4N14LDaniel (D4N14L) commented Dec 1, 2021

Copy link
Copy Markdown
Contributor

Summary

Updates the Rushstack repo to support and use ESLint v8 for linting.

Fixes#2890

cc Lukas (@lukashass)

Details

There are some aspects to this upgrade that deserve to be called out:

  • @rushstack/tree-pattern is temporarily remaining on eslint@7.30.0. This is due to it's dependency on an older version of @rushstack/eslint-config/@rushstack/eslint-plugin since it consumes these packages as cyclic dependencies. Once the new packages are published and the cyclic dependencies are bumped, this project should be able to be updated to 8.3.0 and have the common-versions.json changes removed.
  • @rushstack/eslint-config temporarily disables eslint-plugin-promise rules (of which there was only one). This is required since the package does not yet support ESLint v8 (see this issue: Support ESLint 8.x eslint-community/eslint-plugin-promise#218).

How it was tested

Build while consuming the new version of ESLint and the updated config/plugin in dependent projects.

@iclanton

Copy link
Copy Markdown
Member

Can you add a project that continues to test ESLint 7?

@iclanton

Copy link
Copy Markdown
Member

IIRC you mentioned that eslint-plugin-promise is just missing some manifest file. Can we add something in eslint-patch to fix that as a stopgap?

Comment threadapps/rush-lib/src/logic/taskRunner/BaseBuilder.ts
Comment threadcommon/config/rush/common-versions.json
Comment threadstack/eslint-plugin/src/no-new-null.ts
@D4N14L

Copy link
Copy Markdown
ContributorAuthor

IIRC you mentioned that eslint-plugin-promise is just missing some manifest file. Can we add something in eslint-patch to fix that as a stopgap?

I would prefer not to go that route. The change on the eslint-plugin-promise is relatively minor, just taking a while to go through... on our side, we currently only consume one rule, and it's a pretty simple one (confusing resolve and reject callbacks). Patching for eslint to add a new feature is one thing... patching a rules package where we only consume 1 rule seems excessive. Especially since eslint-patch is now used by so many people: https://www.npmjs.com/package/@rushstack/eslint-patch

@D4N14L

Copy link
Copy Markdown
ContributorAuthor

Ian Clanton-Thuon (@iclanton) I added a small test project, could you take a look to make sure that it's sufficient?

Comment threadbuild-tests/eslint-7-test/README.md Outdated
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Support ESLint 8.x

2 participants

@D4N14L@iclanton