-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Playground: incorrect type causing false negatives #4493
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
Comments
I was trying to figure out the problem that the playground can't reproduce the bugs such as #4554, this issue, or others I've seen. For typescript-eslint/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts Lines 110 to 112 in b83f597
![]() I went to the commit before #4555 is merged and tested locally and it reproduces as expected. Because This is the same commit before I initially thought maybe the latest version was not used at playground by looking But It seems like latest ts-eslint versions are always used on To sum up, same code but playground's linting and local repo's linting are different My guess now... is that usage of linter is somewhat wrong? 'tsWorker' or somewhere https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/website-eslint/src/linter/parser.js I don't know just maybe totally something else. I tried it for few days and it's all I've found. Maybe someone can help or guess what can be the cause. |
The issue is that for some reason the program that is created for the lint process does not include the TS lib defs, even though the monaco TS instance does. For example here is a playground I created for #4553 (comment). You'll notice that if you delete all of the definitions below the |
Just in case, please tackle this problem if you want because I'm out... I tried tweaking some part where lint was created or sandboxInstance or tried setting up with tsvfs but failed to find the solution... Fix can be easy.. or maybe not. I feel like #4414 is also highly related. good luck |
sadly no, #4414 is unrelated to this one, and has to be handled in different part of code, currently we have 2 additional issues:
@lonyele as for loading libs, all what we have to do is load them from cdn (or cache - localStorage) and add them to program, you can see how this can be done in #4765 |
playground link
This should error because the array is mutable. But it doesn't.
Debugging a bit - for some reason the type of
arg
is{}
.Maybe there's a config issue somewhere?
cc @armano2
The text was updated successfully, but these errors were encountered: