-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Idea: playground plugin for running typescript-eslint #2114
Comments
Had a play around with @armano2's exceptional work on the that WIP eslint playground (that's exactly the sort of case which I abstracted out the sandbox for) - so anything can be made as a playground plugin, but the biggest question is can you make the setup as ergonomic as https://typescript-eslint-armano.netlify.app/ - which I think is a mixed bag of trade-offs First time user experience is going to be weaker. You'd have to have a link: like https://www.typescriptlang.org/play/?dtPR=56838&install-plugin=playground-eslint which opens with a "Are you sure you want to install this?" for the first time Ensuring updates is a bit harder with the plugin because it's not 'update the site and the playground gets the update'. Personally, I'd recommend generating a rollup bundled version of typescript-eslint somewhere to decouple the version of the dep from the playground (which is roughly how the playground works with TS versions) anyway though. But yeah, that could be done as a plugin then |
sandbox is actually really great, its simplifies a lot of things, typescript-eslint playground relies on it heavily https://typescript-eslint.io/play/ are you still planning to add plugin to typescript website for it? |
Me? No, I especially wouldn't want to compete (as I don't work on the TS website for my job anymore) and probably wouldn't be good at keeping it up to date, me + the TS team ensure that the playground infra keeps running (which ensures new sandbox builds etc) and that's enough. If you're pretty stable on how URLs work, we could have an 'export to eslint playground' button (like we do for the AST explorer) in the TS playground's export dropdown, which I think would be cool |
I love it! Yes please! 🎉 |
Improvement Idea: Add a plugin that loads ESLint into the playground with typescript-eslint
Why:
To start, there's discussion of building a whole typescript-eslint playground in typescript-eslint/typescript-eslint#168 and typescript-eslint/typescript-eslint#3147. This would both save a ton of infrastructure-y work and let typescript-eslint use "the" standard TypeScript playground.
Additionally, I often use the playground to share examples of "why aren't these types working?" investigations. It'd be really nice to be able to add eslint-plugin-expect-type.
Alternative ideas:
Well, a few folks have built their own (e.g. https://yeonjuan.github.io/typescript-eslint-demo), but that's a lot of work...
The text was updated successfully, but these errors were encountered: