0

Somehow i can enter anything i want in a .js file but there are no errors nor warnings (syntax highlighting works tough) recognized.

I have no exludes or something.

Also i remember having the option to convert a project into a javascript project but this option is also gone.

my .project

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>JavaScriptProject</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.validation.validationbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    </natures>
</projectDescription>

Anyone knows what could be the reason for this?

Update:

I have configured Tern ESLint for validation (and converted the project to a tern project) but also Tern ESlint is also showing no errors or warnings. My Guess is that somewhere there must be a setting which deavtivated the JavaScript code validation for JSDT and / or Tern but in the settings and project settings i have checked all i can find regarding validation...

Gobliins
  • 3,382
  • 12
  • 52
  • 97
  • 1
    Are you sure you are using the Javascript editor and not just the plain text editor? Right click on the file in Project Explorer and look at what the 'Open With' menu has selected. – greg-449 Jul 05 '17 at 07:36
  • I have configured Eclipse to use JavaScript editor as default for .js and ._js files, also syntax highlighting works.(i checked also the open with dialog) – Gobliins Jul 05 '17 at 07:48
  • Is your source file in something recognized as a Source Folder according to the project's JavaScript Include Path? – nitind Jul 05 '17 at 16:43
  • Yes all included no special excludes. – Gobliins Jul 06 '17 at 08:54

1 Answers1

0

Open your .project file and check if your project has the "jsdt nature". As described as in "Edit 4" in the Question section of this post: how-to-ignore-node-shebang-error-in-eclipse

In the answer sections there is quite some information too.

I also recommend to add 'eslint' with the --fix option as an External Tool Configuration .

knb
  • 8,442
  • 4
  • 54
  • 75