Skip to content

Playground: Virtual file name discrepancy between playground (input.ts) and docs & rule tests (file.ts) #9269

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

Open
JoshuaKGoldberg opened this issue Jun 4, 2024 · 2 comments · Fixed by #9271
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working website: playground

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Jun 4, 2024

Suggestion

Splitting out of https://github.com/typescript-eslint/typescript-eslint/pull/9234/files#r1624918878: we have two different virtual file names used in our tooling.

The playground uses input.ts:

files.set(`/input${config.fileType}`, config.code);

...while docs and rule tests use file.ts:

defaultFilenames: { ts: 'file.ts', tsx: 'react.tsx' },

Rule options such as #8404 that care about file name need a stable name to work the same in both.

💖

@JoshuaKGoldberg
Copy link
Member Author

Reverting #9271, so re-opening this.

@JoshuaKGoldberg JoshuaKGoldberg removed their assignment Jul 6, 2024
@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed team assigned A member of the typescript-eslint team should work on this. labels Jul 6, 2024
@armano2
Copy link
Collaborator

armano2 commented Jul 19, 2024

technically its possible for us to open as many files are you want, currently only limitation is "tabs", as there is no way to choose different file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working website: playground
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants