Skip to content

Conversation

@nzakas
Copy link
Contributor

@nzakas nzakas commented Apr 8, 2024

Updated APIs and dependencies to work with ESLint v9.

fixes #144

@aladdin-add
Copy link
Contributor

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

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
@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)

4 participants