Step one:
Remove eclipse's JS verification:
Change windows->preference->Java Script->Validator->Errors /Warnings->
Uncheck the box in front of Enable Javascript Sematic validation;
Step 2:
Right-click the project -> properties -> Builders and uncheck JavaScript Validator
If there is no JavaScript Validator item in Builders . Then modify the following content in the .project file:
Find the project directory and delete the following parts of the .project file in the project directory:
and
Note that modifying the .project file may require restarting eclipse, or closing the project in eclipse and then reopening the project.
The third step:
Copy the js file somewhere, then delete the js file reporting the error directly from eclipse, the error disappears, and then replace the js file just now
Copy in the js files.
If it still doesn’t work after doing the above, open the Problems view in Eclipse, select the relevant error, and solve it according to the prompts.