Skip to content

chore: use context.filename and context.physicalFilename #1174

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 1 commit into from
Mar 31, 2025

Conversation

43081j
Copy link
Contributor

@43081j 43081j commented Mar 31, 2025

Since we now require latest 8.x, all versions of ESLint we support have both context.filename and context.physicalFilename.

In the old types, physicalFilename could be undefined but now will actually default to filename (so the type has also changed).

If #1173 lands first, this will have conflicts i'll resolve before we can merge.

Copy link

changeset-bot bot commented Mar 31, 2025

🦋 Changeset detected

Latest commit: 47aca08

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@1174

Published Instant Preview Packages:

View Commit

@43081j
Copy link
Contributor Author

43081j commented Mar 31, 2025

i'll open a 3rd PR to remove the file and the dependency entirely once this and #1173 are merged

since we can do the same for cwd too

Since we now require latest 8.x, all versions of ESLint we support have
both `context.filename` and `context.physicalFilename`.

In the old types, `physicalFilename` could be undefined but now will
actually default to `filename` (so the type has also changed).
@baseballyama baseballyama merged commit b696ef3 into sveltejs:main Mar 31, 2025
17 checks passed
@43081j 43081j deleted the file-compat branch March 31, 2025 13:46
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