博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
eslint 报error
阅读量:5105 次
发布时间:2019-06-13

本文共 1602 字,大约阅读时间需要 5 分钟。

1.修改.eslintrc.js 的rule 

  可饮鸩止渴

 

2.sublime安装ESLint-Formatter, Setting如下

{  // The Nodejs installation path  "node_path": {    "windows": "node.exe",    "linux": "/usr/bin/nodejs",    "osx": "/usr/local/bin/node"  },  // The location to search for a locally installed eslint package.  // These are all relative paths to a project's directory.  // If this is not found, it will try to fallback to a global package  // (see 'eslint_path' below)  "local_eslint_path": {    "windows": "node_modules/eslint/bin/eslint.js",    "linux": "node_modules/.bin/eslint",    "osx": "node_modules/.bin/eslint"  },  // The location of the globally installed eslint package to use as a fallback  "eslint_path": {    "windows": "%APPDATA%/npm/node_modules/eslint/bin/eslint",    "linux": "/usr/bin/eslint",    "osx": "/usr/local/bin/eslint"  },  // Specify this path to an eslint config file to override the default behavior.  // Passed to eslint as --config. Read more here:  // http://eslint.org/docs/user-guide/command-line-interface#c---config  // If an absolute path is provided, it will use as is.  // Else, it will look for the file in the root of the project directory.   // Failing either, it will skip the config file  "config_path": "",  // Automatically format when a file is saved.  "format_on_save": false,  // Only attempt to format files with whitelisted extensions on save.  // Leave empty to disable the check  "format_on_save_extensions": [    "js",    "jsx",    "es",    "es6",    "babel"  ]}

可设置为 "format_on_save": true,  不过每次save会有1-2秒的卡顿, 比jsformat 慢多了

 

转载于:https://www.cnblogs.com/ignacio/p/8527874.html

你可能感兴趣的文章
css3之transform-origin
查看>>
[转]JavaScript快速检测浏览器对CSS3特性的支持
查看>>
Master选举原理
查看>>
[ JAVA编程 ] double类型计算精度丢失问题及解决方法
查看>>
小别离
查看>>
微信小程序-发起 HTTPS 请求
查看>>
WPF动画设置1(转)
查看>>
基于node/mongo的App Docker化测试环境搭建
查看>>
java web 中base64传输的坑
查看>>
秒杀9种排序算法(JavaScript版)
查看>>
Activiti入门 -- 环境搭建和核心API简介
查看>>
struts.convention.classes.reload配置为true,tomcat启动报错
查看>>
MySQL的并行复制多线程复制MTS(Multi-Threaded Slaves)
查看>>
好玩的-记最近玩的几个经典ipad ios游戏
查看>>
MySQL更改默认的数据文档存储目录
查看>>
PyQt5--EventSender
查看>>
Sql Server 中由数字转换为指定长度的字符串
查看>>
Java 多态 虚方法
查看>>
Unity之fragment shader中如何获得视口空间中的坐标
查看>>
万能的SQLHelper帮助类
查看>>