Solve the problem of using idea to open js files that can run without problems, and there are multiple red wavy line warnings

The js project just pulled from the library was opened with idea, and there were red wavy lines everywhere.
insert image description here

Solution:

Red flags in large areas are generally false warnings caused by different language versions.
The project is ES6 syntax, and the default js of my idea is ES5 syntax. Just change the language version.
Specific method:
File->Settings->Languages&Frameworks->JavaScript
switch JavaScript language version->ECMAScript 6

insert image description here
After clicking OK to confirm, wait for the progress bar below to complete the compilation and it will be normal.

insert image description here

Guess you like

Origin blog.csdn.net/weixin_45752941/article/details/113768260