Eclipse removes js (JavaScript) errors

Recently, a very strange phenomenon has occurred. A certain js file is staying in a certain Eclipse project. Suddenly, when a new project is created and the js file is copied into it, Eclipse prompts an error. I'm very sensitive to Eclipse bugs and am determined to get rid of it.

first step:

Remove eclipse's JS validation:

Remove the hook in front of window->preference->Java Script->Validator->Errors/Warnings->Enable Javascript Sematic validation; 

Step 2:

Locate the project directory and remove the following section from the .project file in the project directory:

<buildCommand>

<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>

<arguments></arguments>

</buildCommand>

and

<nature>org.eclipse.wst.jsdt.core.jsNature</nature> is fine, but I found that it still doesn't work. After deleting these two sentences, I refreshed the project, but it still reported an error.

third step:

So I directly deleted the js file that reported the error, the error disappeared, and then copied the js file just now, and found that no error was reported. Get it! In order to verify whether the configuration in the .project deleted above is valid, I added two sentences in the .project file, also deleted the js file, and then copied the js file in, but Eclipse still reported an error! It seems that these two configurations are really useful! But then again, I am not very satisfied with this result, I hope that people who read this article can give me a more accurate reason and solution!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326802159&siteId=291194637
Recommended