Skip to content

chore: use context.sourceCode instead of compat #1173

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

Merged
merged 5 commits into from
Mar 31, 2025

Conversation

43081j
Copy link
Contributor

@43081j 43081j commented Mar 31, 2025

As of 3.x, we only support 8.57.1 and >=9.0.0 of ESLint.

Both of these have context.sourceCode available, so we should no longer need the getSourceCode compat helper.

The helper does polyfill some missing methods but 8.57.1 seems to have all of those already.

As of 3.x, we only support `8.57.1` and `>=9.0.0` of ESLint.

Both of these have `context.sourceCode` available, so we should no
longer need the `getSourceCode` compat helper.

The helper does polyfill some missing methods but `8.57.1` seems to have
all of those already.
Copy link

changeset-bot bot commented Mar 31, 2025

🦋 Changeset detected

Latest commit: 889f5bf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 31, 2025

Try the Instant Preview in Online Playground

ESLint Online Playground

Install the Instant Preview to Your Local

npm i https://pkg.pr.new/eslint-plugin-svelte@1173

Published Instant Preview Packages:

View Commit

Copy link
Member

@baseballyama baseballyama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update packages/eslint-plugin-svelte/eslint.config.mjs line number 73?

@43081j
Copy link
Contributor Author

43081j commented Mar 31, 2025

i had the same thought and just made the change as you wrote that, in the other PR too 👍

Copy link
Member

@baseballyama baseballyama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@baseballyama baseballyama merged commit 8e53e58 into sveltejs:main Mar 31, 2025
17 checks passed
@43081j 43081j deleted the source-code-compat branch March 31, 2025 13:34
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