-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Conversation
rules/detect-child-process.js
Outdated
@@ -46,14 +47,14 @@ module.exports = { | |||
!node.arguments.length || | |||
isStaticExpression({ | |||
node: node.arguments[0], | |||
scope: context.getScope(), | |||
scope: sourceCode.getScope(node.arguments[0]), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Updated APIs and dependencies to work with ESLint v9.
fixes #144