我如何获得Netbeans插件eslint的工作?

问题描述:

这是我的过程我如何获得Netbeans插件eslint的工作?

  • 安装的node.js/NPM https://www.npmjs.com/get-npm
  • 安装eslint NPM我-g eslint
  • 选择工具 - >选项 - > HTML/JS - > ESLint
  • 套装ESLint路径为C:\ Program Files文件\的NodeJS
  • 设置的conf路径Z:.eslintrc.json

没有行动项目s的ESLint,但是当我从命令行运行它时,我得到了该文件的错误。

我以这种方式配置在的Ubuntu 16.04的Netbeans 8.2

  1. 按照你的步骤后
  2. 我搜索在已安装我的eslint(在我的情况下,在的/ usr/bin/eslint

    enter image description here

  3. 你需要一个配置文件eslint(我创建一个在我的主文件夹文件.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. 我的配置NetBeans是这样的:

    enter image description here

  2. 当你检查代码是(当y OU将鼠标移动到红色部分则显示错误):

    enter image description here

  3. 希望这有助于你

    问候

开始=>