eslint配置 在 webStorm 格式化配置

参考:https://blog.csdn.net/qq_29329037/article/details/80100450

mac环境下

1.点击preferences->pluings ->搜索eslint-> Install安装

 

 

 2.安装好之后,找到preferences中ESLint,选中,就会进入配置页面,勾选Enable->第一项配置自己安装nodejs目录下node.exe,第二项配置当前项目中node_modules/.bin目录下的eslint.cmd,第三项改成node_modules/eslint-config-airbnb-base/test/.eslintrc

 

 

3.最后点击Apply应用,点击ok就行了

4.使用可以在菜单栏下的code->ESlint Fix 修复,也可以设置快捷键,如下:
点击keyMap->搜索eslint->选中code下面的eslint->右键Add Keyboard ShortCut 摁住Alt + X(自定义快捷键) 键 以后使用alt + x 就可以直接进行eslint修复了

 

 

 

posted on 2019-11-13 14:24  咚咚粉丝汤  阅读(2536)  评论(0编辑  收藏  举报

导航