See #6658 for background.
Currently for JavaScript files we provide a very limited set of errors, mostly for syntax errors. There are a number of grammatical and type errors that would be useful to display also.
Brief notes from ad hoc discussion in the team room include:
More detailed design to come...
From our own usage for Salsa for editing JS, we miss a warning about undefined variables. In eslint:
{
"rules": {
"no-undef": 2,
"no-unused-vars": 1
}
}
The other warning we got used is the one about unused local variables.
From #9132, it is clear that point 2 and 3 are valid for these type of issues. When importing just for emitting purposes (e.g. import 'foo.js';) some developers would like to be warned that that file is not resolvable, but many others would be expressly importing something that is only resolvable at run-time. So the ability to a) only have it be a warning and b) allow that warning to be turn off.
Hey TS team, there is currently a somewhat relevant discussion to this in #9694. (A flow-style system of allowing fully checked type annotations in comments in .js files). It seems already a little bit contentious and there is a bit of noise in that issue (sorry!)
I have started work on a basic PR to demonstrate this functionality and am willing to do up a proper proposal and even implementation if the team would be open to that. Would this functionality ever be considered?
Most helpful comment
Hey TS team, there is currently a somewhat relevant discussion to this in #9694. (A flow-style system of allowing fully checked type annotations in comments in .js files). It seems already a little bit contentious and there is a bit of noise in that issue (sorry!)
I have started work on a basic PR to demonstrate this functionality and am willing to do up a proper proposal and even implementation if the team would be open to that. Would this functionality ever be considered?