Z
Z
Zewsekus2020-09-02 21:12:31
Visual Studio Code
Zewsekus, 2020-09-02 21:12:31

Why did VSCode misdetect .js files?

At some point, VSCode began to define .js files as .ts and accordingly apply typescript linter rules to js code.
I tried to change the keys in settings.json, but something doesn't work. Tell me where to think

5f4fe06c5cdd7430863427.png
5f4fe0793f94f108362590.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gennady S, 2020-09-02
@Zewsekus

Apparently it's the option: "javascript.implicitProjectConfig.checkJs": true , you can check it by turning it off or adding // @ts-check to the beginning of the file

A
Alexander, 2020-09-02
@Alexandre888

maybe if these files are generated automatically, they want to tell you how dull and poor pure javascript is, that they lack the environment to reveal their full potential?
typescript is just "improved javascript" and you shouldn't worry about it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question