5

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.

AllisonC
  • 2,973
  • 4
  • 29
  • 46

1 Answers1

6

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

gastonnina
  • 559
  • 1
  • 10
  • 23
  • Not working for me and i am also ubuntu 16.04 and Netbeans 8.2 – Ivan Marjanovic Mar 08 '19 at 20:30
  • netbeans source -> format is not compatible with eslint --fix – Rivenfall Apr 30 '19 at 14:21
  • This answer helped. AND I had to get eslint working on the command line. Go to project folder and try `eslint path/to.js` and if an error shows, Google it. The fuller command to try is `/usr/bin/eslint --config /some/path/.eslintrc --format compact .` – efreed Jul 10 '19 at 18:19