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: eslint v9.0.0 compatibility (fixes #143) #144

Merged
merged 7 commits into from Dec 11, 2023
Merged

Conversation

aladdin-add
Copy link

@aladdin-add aladdin-add commented Nov 24, 2023

Copy link

@scagood scagood left a comment

Choose a reason for hiding this comment

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

suggestion (non-blocking): It may be worth considering expiring-todo-comments here as that is a lot of TODOs we'll need to deal with in the future!

lib/rules/no-unsupported-features.js Outdated Show resolved Hide resolved
lib/util/get-typescript-extension-map.js Outdated Show resolved Hide resolved
lib/util/is-typescript.js Outdated Show resolved Hide resolved
@aladdin-add
Copy link
Author

It may be worth considering expiring-todo-comments here as that is a lot of TODOs we'll need to deal with in the future!

If that's the case, I'd prefer to use an issue for tracking the todos - it's not a good DX if someone makes an unrelated change and the build suddenly fails.

@aladdin-add aladdin-add marked this pull request as draft November 27, 2023 09:41
@scagood
Copy link

scagood commented Nov 27, 2023

If that's the case, I'd prefer to use an issue for tracking the todos - it's not a good DX if someone makes an unrelated change and the build suddenly fails.

mmm, that's fair, maybe a gh action to pull all todos into a comment would be nice.

Do ignore this for now, we can solve it later as you say!

// eslint ^7 (deprecated ^8)
context.getFilename?.()
) ||
getFromTSConfigFromFile(filename) ||
Copy link

Choose a reason for hiding this comment

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

For reference, in #139 I moved this wholesale to lib/util/get-tsconfig.js:32

@scagood
Copy link

scagood commented Nov 27, 2023

I can still see two more places, here are the traces:

(node:17752) DeprecationWarning: "no-unsupported-features/es-syntax" rule is using `context.getScope()`, which is deprecated and will be removed in ESLint v9. Please use `sourceCode.getScope()` instead.
  at dispatch (/home/scagood/github/eslint-plugin-n/lib/util/merge-visitors-in-place.js:16:136)
(node:17752) DeprecationWarning: "prefer-global/buffer" rule is using `context.getScope()`, which is deprecated and will be removed in ESLint v9. Please use `sourceCode.getScope()` instead.
  at Verifier.verifyToPreferModules (/home/scagood/github/eslint-plugin-n/lib/util/check-prefer-global.js:18:178)
  at checkForPreferGlobal (/home/scagood/github/eslint-plugin-n/lib/util/check-prefer-global.js:18:524)
  at Program:exit (/home/scagood/github/eslint-plugin-n/lib/rules/prefer-global/buffer.js:5:1047)

@aladdin-add
Copy link
Author

thanks for checking this, will investigate it later. :)

@bmish
Copy link
Member

bmish commented Dec 3, 2023

You need to move fixes #143 to the PR description for linking to work properly.

@aladdin-add
Copy link
Author

it's ready for reviewing now. 🎉

@aladdin-add
Copy link
Author

I'm going to merge it as of now - we can do another PR if you have any suggestions:). cc @scagood

Signed-off-by: 唯然 <weiran.zsd@outlook.com>
@aladdin-add aladdin-add changed the title fix: eslint v9.0.0 compatibility (fixes #143) feat: eslint v9.0.0 compatibility (fixes #143) Dec 11, 2023
@aladdin-add aladdin-add merged commit b075568 into master Dec 11, 2023
16 checks passed
@aladdin-add aladdin-add deleted the issue143 branch December 11, 2023 03:04
@scagood
Copy link

scagood commented Dec 11, 2023

Sorry, I have been away 👀

I have no additional comments, this looks good to me 😀

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.

Bug: Update context methods to source code methods
3 participants