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

ESLINTJS-53 Fix incompatibilities with ESLint 9 #4818

Merged
merged 12 commits into from
Sep 19, 2024
Merged

ESLINTJS-53 Fix incompatibilities with ESLint 9 #4818

merged 12 commits into from
Sep 19, 2024

Conversation

vdiez
Copy link
Contributor

@vdiez vdiez commented Sep 16, 2024

Copy link
Contributor

@zglicz zglicz left a 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

Comment on lines +96 to +100
// @ts-ignore
getSource(...args) {
return originalContext.sourceCode.getText(...args);
},

Copy link
Contributor

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

Copy link
Contributor Author

@vdiez vdiez Sep 18, 2024

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.

@vdiez
Copy link
Contributor Author

vdiez commented Sep 18, 2024

Sorry there are many changes related to removing completely ESLint ids, work started in JS-278

Copy link
Contributor

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?

Copy link
Contributor

@ericmorand-sonarsource ericmorand-sonarsource left a 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

@vdiez vdiez merged commit 9c65fbd into master Sep 19, 2024
15 of 16 checks passed
@vdiez vdiez deleted the eslint9-fixes branch September 19, 2024 12:15
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.

3 participants