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

fix: Ensure everything works with ESLint v9 #145

Merged
merged 3 commits into from
Apr 10, 2024
Merged

fix: Ensure everything works with ESLint v9 #145

merged 3 commits into from
Apr 10, 2024

Conversation

nzakas
Copy link
Contributor

@nzakas nzakas commented Apr 8, 2024

Updated APIs and dependencies to work with ESLint v9.

fixes #144

package.json Outdated Show resolved Hide resolved
@aladdin-add
Copy link
Contributor

hopefully the ci can be fixed by #146 & #147.

@@ -46,14 +47,14 @@ module.exports = {
!node.arguments.length ||
isStaticExpression({
node: node.arguments[0],
scope: context.getScope(),
scope: sourceCode.getScope(node.arguments[0]),

Choose a reason for hiding this comment

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

Shouldn't it be like

scope: sourceCode.getScpe ? sourceCode.getScope(node) : context.getScope();

for a better backward compatibility?
Otherwise, this plugin will require the ESLint v8.37.0 or newer, which makes it not backward compatible and should lead to a major version bump.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point. We may end up doing a breaking release anyway for #146 but I can make this change.

@nzakas nzakas merged commit ac50ab4 into main Apr 10, 2024
8 checks passed
@nzakas nzakas deleted the issue144 branch April 10, 2024 17:42
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 v9 compatibility (TypeError: context.getScope is not a function)
3 participants