Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the Netbeans plugin eslint to work?

This was my process

  • Install node.js/npm https://www.npmjs.com/get-npm
  • Install eslint npm i -g eslint
  • Go to Tools -> Options -> HTML/JS -> ESLint
  • Set ESLint path to C:\Program Files\nodejs
  • Set Conf path to Z:.eslintrc.json

There are no Action Items for ESLint, however when I run it from the command line, I get errors for the file.

like image 873
AllisonC Avatar asked Jun 22 '17 13:06

AllisonC


1 Answers

I configured in this way in ubuntu 16.04 and Netbeans 8.2

  1. After follow your steps
  2. I searched where was installed my eslint (at my case at /usr/bin/eslint)

    enter image description here

  3. You need a config eslint file (I create one at my home folder a file .eslintrc.json)

{
   "env": {
        "browser": true,
        "node": true
    },
    "extends": "eslint:recommended",
    "rules": {
        "indent": [
            "error",
            3
        ],
        "linebreak-style": [
           "error",
           "unix"
       ],
        "no-console": "off",
        "quotes": [
            "error",
            "single"
        ],
        "semi": [
            "error",
            "always"
       ]
    }
}
  1. My config in netbeans is like this:

    enter image description here

  2. And when you check the code is (when you move the mouse over the red segment it shows the errors):

    enter image description here

Hope this help you

Greetings

like image 82
gastonnina Avatar answered Sep 28 '22 03:09

gastonnina