If you're encountering errors related to the [ts]
token, there's a helpful discussion on a GitHub issue. One comment stands out:
Yes. The TypeScript extension powers our javascript intellisense, which is why you see [TS]
in your js file. That only indicates what extension is providing that error.
To disable this validation, simply add the following line to your settings.json
file:
"javascript.validate.enable": false
For more information on this option, refer to the documentation:
By setting
javascript.validate.enable: false
, all built-in syntax checking is turned off. In such cases, using tools like ESLint for code validation is recommended.
If you are particularly concerned about import
/export
errors, consider adding a jsconfig.json
file with the following configuration to your project:
{
"compilerOptions": {
"module": "es2015"
}
}
This configuration tells VS Code to use the es2015 module syntax (import
/export
), potentially resolving any related issues.