关于Sublime  Text 2中的SublimeLinter的使用网上多如牛毛,基本上不会遇到什么问题,简单的讲一下关于Sublime Text 3中遇到的问题:

1.通过package control(cmd+shift+p),搜索SublimeLinter,安装,如果按照网上的配置是没法进行JS和CSS校验的;

2.安装jshint,csslint,SublimeLinter在Text 3中自己本身演变成了一个框架,关于各个语言校验的集合,关于各种语言的校验又拆成对应的小模块:

(需要安装node,如果没有安装的可以参考本人之前的文章)

安装jshint:

npm install -g jshint

安装csslint:

npm install -g csslint

3.这个时候不要急于配置,还需要两个对应的插件SublimeLinter-jshint以及SublimeLinter-csslint,如果没有出错的话,这个时候是有对应的JS和CSS警告以及提示的;

4.配置可选项,SublimeLinter向下兼容,配置选项参考网上前辈的配置:

{
"sublimelinter": "save-only",
"sublimelinter_popup_errors_on_save": true,
"sublimelinter_executable_map": {
"javascript": "http://www.cnblogs.com/xiaofeixiang/",
"css": "http://www.cnblogs.com/xiaofeixiang/"
},
"jshint_options": {
"strict": false,
"quotmark": "single", //只能使用单引号
"noarg": true,
"noempty": true, //不允许使用空语句块{}
"eqeqeq": false, //!==和===检查
"undef": true,
"curly": true, //值为true时,不能省略循环和条件语句后的大括号
"forin": true, //for in hasOwnPropery检查
"devel": true,
"jquery": true,
"browser": true,
"wsh": true,
"evil": true,
"unused": "vars", //形参和变量未使用检查
"latedef": true, //先定义变量,后使用
"globals": {
"grunt": true,
"module": true,
"window": true,
"jQuery": true,
"$": true,
"global": true,
"document": true,
"console": true,
"setTimeout": true,
"setInterval": true
}
},
"csslint_options": {
"adjoining-classes": false,
"box-sizing": false,
"box-model": false,
"compatible-vendor-prefixes": false,
"floats": false,
"font-sizes": false,
"gradients": false,
"important": false,
"known-properties": false,
"outline-none": false,
"qualified-headings": false,
"regex-selectors": false,
"shorthand": false,
"text-indent": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false
}
}

5.如果对于SublimeLinter有兴趣可以参考官网:http://www.sublimelinter.com/en/latest/

最新文章

  1. vue.js学习(第一课)
  2. C++迪杰斯特拉算法求最短路径
  3. Arcgis SDE10.1 和 Arcgis server10.1的授权文件license
  4. ExtJs
  5. google protocol buffer 使用说明
  6. 移动设备和SharePoint 2013 - 第4部分:定位
  7. ubuntu桌面环境配置及切换
  8. 标准C编程-笔记全集
  9. 《Effective C++》:规定44-规定45
  10. Hbase在的应用经验的统计
  11. aync await 进一步探索
  12. 【JSP 标签】选择判断c:choose
  13. JavaScript实现动画效果
  14. 第一次C语言实验报告
  15. 初识Java——一维数组的创建及使用
  16. Login Verification CodeForces - 928A (实现)
  17. 初识css预处理器:Sass、LESS
  18. IntellIJ IDEA 配置 Vue 支持
  19. 什么是EOS(不一样的角度看柚子)
  20. 在多台PC之间同步Resharper所有设置的方法

热门文章

  1. php模板引擎之featherview
  2. ScrollView中嵌套GridView,Listview的办法
  3. BZOJ4278 : [ONTAK2015]Tasowanie
  4. shell 常用命令语句
  5. 接口开发-基于SpringBoot创建基础框架
  6. [Go] Beego 模板嵌套 使用总结
  7. C++ classes and uniform initialization
  8. ASP.NET Web API接受AngualrJS的QueryString的两种方式
  9. Android之仿iphone抖动效果
  10. Material Designer的低版本兼容实现(八)—— Flat Button