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

support eslint 9 #120

Closed
wants to merge 1 commit into from
Closed

support eslint 9 #120

wants to merge 1 commit into from

Conversation

tgds
Copy link
Contributor

@tgds tgds commented Apr 10, 2024

no-literal-string rule is failing in eslint@9, because few deprecated context methods have been removed (eslint/eslint@ae78ff1). parserServices and getAncestors methods now live under context.sourceCode.

`no-literal-string` rule is failing in eslint@9, because few deprecated context methods have been removed (eslint/eslint@ae78ff1). `parserServices` and `getAncestors` methods now live under `context.sourceCode`.
@tgds
Copy link
Contributor Author

tgds commented May 21, 2024

@edvardchen, any chance to merge this please?

@edvardchen
Copy link
Owner

The changes will break on eslint below v9. Should find the 2 methods under context and then under context. sourceCode

It's weird that the gitlab actions were triggered

@edvardchen edvardchen closed this May 22, 2024
@edvardchen edvardchen reopened this May 22, 2024
@tgds
Copy link
Contributor Author

tgds commented May 22, 2024

The changes will break on eslint below v9. Should find the 2 methods under context and then under context. sourceCode

It's weird that the gitlab actions were triggered

Ah true. I didn't realise, you support older than v8 releases. It should work for v8.44.0 and later though. parseServices were moved in that release, while the getAncestors method was moved even earlier.

What do you suggest to do?

@edvardchen
Copy link
Owner

I didn't explain clearly. How about

const parserServices = context.parserServices || context.sourceCode.parserServices

And having some comments around will be nice

@edvardchen
Copy link
Owner

closed in favor of #126

@edvardchen edvardchen closed this Jul 13, 2024
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.

2 participants