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

feat: support eslint@8 #940

Merged
merged 3 commits into from Oct 14, 2021
Merged

feat: support eslint@8 #940

merged 3 commits into from Oct 14, 2021

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Oct 11, 2021

@G-Rath this is not meant to be merged, just to see where we're at.

Closes #903

package.json Outdated
@@ -60,6 +60,9 @@
"projects": [
{
"displayName": "test",
"moduleNameMapper": {
"@eslint/eslintrc/universal": "@eslint/eslintrc/dist/eslintrc-universal.cjs"
Copy link
Member Author

Choose a reason for hiding this comment

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

it uses package exports: jestjs/jest#9771

@G-Rath
Copy link
Collaborator

G-Rath commented Oct 11, 2021

Sweet, I'll have a look at the type failings sometime this week - are we still planning to try and have backwards compat with v4?

@SimenB
Copy link
Member Author

SimenB commented Oct 11, 2021

are we still planning to try and have backwards compat with v4?

Unless it proves painful, yes. I assume it's just a change of a few lines, but who knows 😀

@G-Rath
Copy link
Collaborator

G-Rath commented Oct 11, 2021

Cool cool - unbound-method is really the only one I'm worried about right now, as the types should be easily handled worst-case with some raw strings and coverage ignores, but if unbound-method has had any major changes (in it or any utils that it uses) then it might be tough.

(I've not have a chance to look at what the actual changes in v5 are, as been pretty slammed with work)

@SimenB
Copy link
Member Author

SimenB commented Oct 11, 2021

Seems v4 of the plugin doesn't support eslint v8, so we need to exclude that combination from CI. I still think it's worthwhile for us to attempt to support both versions, tho (even though they don't work together).

EDIT: hah, somehow managed the config first try 🥳

@SimenB SimenB mentioned this pull request Oct 11, 2021
50 tasks
@SimenB
Copy link
Member Author

SimenB commented Oct 11, 2021

Ok, the issue (beyond missing update to eslint-plugin-import) just seems to be that the unbound rule is broken on ESLint v8. Beyond that we're good to go (oh, and dependencies using @typescript-eslint/experimental-utils@4, but we can use resolutions for that to get a release out while we wait)

@G-Rath
Copy link
Collaborator

G-Rath commented Oct 14, 2021

This was the issue with unbound-rule:

● Test suite failed to run

    Cannot find module 'eslint/use-at-your-own-risk' from 'node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js'

    Require stack:
      node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js
      node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
      node_modules/@typescript-eslint/eslint-plugin/dist/index.js
      src/rules/__tests__/unbound-method.test.ts

      at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:322:11)

@SimenB
Copy link
Member Author

SimenB commented Oct 14, 2021

hah, that's it 😅 nice!

@SimenB SimenB changed the title chore: v8 feat: support eslint@8 Oct 14, 2021
@SimenB SimenB linked an issue Oct 14, 2021 that may be closed by this pull request
@SimenB SimenB marked this pull request as ready for review October 14, 2021 19:34
@SimenB SimenB merged commit 5a9e45f into main Oct 14, 2021
@SimenB SimenB deleted the v8 branch October 14, 2021 19:34
@@ -149,5 +152,8 @@
"@semantic-release/git",
"@semantic-release/github"
]
},
"resolutions": {
"@typescript-eslint/experimental-utils": "^5.0.0"
Copy link
Member Author

Choose a reason for hiding this comment

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

we need to remove this at some point, but fine for now as it's repo local (like the moduleNameMapper thing)

github-actions bot pushed a commit that referenced this pull request Oct 14, 2021
# [25.1.0](v25.0.6...v25.1.0) (2021-10-14)

### Features

* support `eslint@8` ([#940](#940)) ([5a9e45f](5a9e45f))
@github-actions
Copy link

🎉 This PR is included in version 25.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Support ESLint 8.x
2 participants