Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 798 Bytes

sublime.md

File metadata and controls

31 lines (23 loc) · 798 Bytes

Sublime中配置ESLint

安装

通过Package Control安装Summit​LinterSublime​Linter-contrib-eslint

设置

Sublime Text -> Prefences -> Package Settings -> SublimeLinter -> Settings-User

打开文件后,修改paths属性对应平台的值来设置Node的安装路径。(可以通过which node命令来获取该路径。)

"paths": {
    "linux": [],
    "osx": [
        "/Users/wangjinliang/.nvm/versions/node/v4.3.2/bin"
    ],
    "windows": []
}

使用

  • 在本地项目下安装eslint及其插件

    npm i --save-dev eslint [eslint-plugins]
    
  • 添加.eslintrc文件