-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
docs(website): load typescript libs in playground #4765
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
); | ||
export function createASTProgram(code, isJsx, compilerOptions, libs) { | ||
const fileName = isJsx ? '/demo.tsx' : '/demo.ts'; | ||
const compilerHost = new CompilerHost(libs, isJsx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally we would like to use watch compiler host, but that can come latter
3f06d47
to
271530a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an aside - should we be converting website-eslint
to TS? Seems like we're adding more and more code, so the safety would probably be a good thing to have.
LGTM - thanks so much for working and fixing this!
This is a huge win for setting up issue repros!
Hmmm @armano2 - it looks like this didn't quite fix it.
|
that's weird, if i run test on this branch this seem to be working correctly |
Super strange! I'm not sure why the two environments would differ! |
ok i found issue, I'm going to submit PR with this |
@bradzacher generally i will like to get rid of js code from this package, and move weblinter to website, initially i created it to process eslint, typescript and tseslint to version usable by browser, but it grew a little, when i find some time i'm going to to some refactoring, but for now my work is keeping me to "bussy" |
PR Checklist
Overview
Logic used to load requested libs from cdn and parse them in compiler
Repro
Playground Playground 2
this solution is not ideal, as libs are loaded once during editor initialization and can't be changed without reload, for now this is not an issue as there is no way to specify libs
note: dynamic typescript config is and was not taken into account in eslint, this should be adjusted in latter PR