-
Notifications
You must be signed in to change notification settings - Fork 181
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
ESLINTJS-53 Fix incompatibilities with ESLint 9 #4818
Conversation
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.
Could you see if these are real issues that would fail in eslint v9
// @ts-ignore | ||
getSource(...args) { | ||
return originalContext.sourceCode.getText(...args); | ||
}, | ||
|
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.
above you are using originalContext.getAncestors();
, originalContext.getScope();
and originalContext.markVariableAsUsed(name);
Apparently, these now requires a node as an argument https://eslint.org/docs/latest/use/migrate-to-9.0.0#-removed-multiple-context-methods
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.
The ones in the sourceCode
object require a node. This overrides the context and forwards the same call. Tomorrow, I'll check how many of the decorated rules use those methods.
Quality Gate passedIssues Measures |
Sorry there are many changes related to removing completely ESLint ids, work started in JS-278 |
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.
Out of curiosity, were these fixtures not used?
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.
Looks good to me
Fixes https://sonarsource.atlassian.net/browse/ESLINTJS-53
Fixes https://sonarsource.atlassian.net/browse/JS-297