Open rotu opened 5 months ago
Notably they can't be string literals in JS before ES2021. and https://github.com/microsoft/TypeScript/issues/40594 is the TS issue to support them.
Since I haven't dug into this further yet, I'll say that if the test case shouldn't be running (because the failure is expected) then it should be skipped when expected to fail; if it should be working, then it should be fixed :-)
Thanks! I was about to file an issue with TypeScript - don't know why I couldn't find it :-).
I don't know what the expectation is here - the babel-eslint
package is deprecated in favor of @babel/eslint-parser
"babel-eslint is now @babel/eslint-parser. This package will no longer receive updates." (I don't know whether newer versions parse this correctly either); is there a way to indicate when running tests which of these dependencies to use?
The solution I'd like there is attempted in PRs like #2482 - basically, run each test case in multiple parsers, transparently, and the test case only defines the language features it's using. However, I don't think anything's using this technique here yet (eslint-plugin-react uses it extensively already)
When running the tests locally, I see an odd error:
Module export names can indeed be string literals in JavaScript.
But note that module export names cannot be string literals in TypeScript, and it seems the TypeScript compiler also mangles these.