sublimelinter-jshinter
---
ocalhost:~ nihao$ sudo npm install jshint -g
Password:
/usr/local/bin/jshint -> /usr/local/lib/node_modules/jshint/bin/jshint
jshint@2.6.0 /usr/local/lib/node_modules/jshint
├── strip-json-comments@1.0.2
├── underscore@1.6.0
├── exit@0.1.2
├── shelljs@0.3.0
├── minimatch@1.0.0 (sigmund@1.0.0, lru-cache@2.5.0)
├── console-browserify@1.1.0 (date-now@0.1.4)
├── cli@0.6.5 (glob@3.2.11)
└── htmlparser2@3.8.2 (domelementtype@1.1.3, entities@1.0.0, domhandler@2.3.0, readable-stream@1.1.13, domutils@1.5.1)
localhost:~ nihao$
-
设置配置文件:
SublineText》Preferences》Package Settings》Package Control》Settings-User》
=================================================
{
"installed_packages":
[
"HTML-CSS-JS Prettify",
"Node Completions",
"SublimeLinter-jshint"
], "sublimelinter": "save-only",
"sublimelinter_popup_errors_on_save": true,
"sublimelinter_executable_map": {
"javascript": "/usr/local/bin/node",
"css": "/usr/local/bin/node"//"D:/nodejs/node.exe"
},
"jshint_options": {
"strict": false,
"quotmark": "single", //只能使用单引号
"noarg": true,
"noempty": true, //不允许使用空语句块{}
"eqeqeq": true, //!==和===检查
"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
} }
--
--MAC安装Sublime Linter - jshint 插件:
在mac sublime中按下:commond+shift+p
在弹出的输入框中输入:install package
然后在弹出的输入框中输入选择:sublimelinter
然后继续安装:sublimelinter-jshint
在Node中安装:npm install jshint -g
--
Package Control Messages
========================
SublimeLinter:
-------------
____ _ _ _ _ _ _
/ ___| _ _| |__ | (_)_ __ ___ ___| | (_)_ __ | |_ ___ _ __
\___ \| | | | '_ \| | | '_ ` _ \ / _ \ | | | '_ \| __/ _ \ '__|
___) | |_| | |_) | | | | | | | | __/ |___| | | | | || __/ |
|____/ \__,_|_.__/|_|_|_| |_| |_|\___|_____|_|_| |_|\__\___|_|
Welcome to SublimeLinter, a linter framework for Sublime Text 3.
* * * IMPORTANT! * * *
SublimeLinter 3 is NOT a drop-in replacement for
earlier versions.
Linters *NOT* included with SublimeLinter 3,
they must be installed separately.
The settings are different.
* * * READ THE DOCS! * * *
Otherwise you will never know how to install linters, nor will
you know about all of the great new features in SublimeLinter 3.
For complete documentation on how to install and use SublimeLinter,
please see:
http://www.sublimelinter.com
_ _ _ _
| | | | ___| |_ __ | |
| |_| |/ _ \ | '_ \| |
| _ | __/ | |_) |_|
|_| |_|\___|_| .__/(_)
|_|
Hundreds of hours have been spent writing and documenting SublimeLinter
to make it the best it can be — easy to use, easy to configure,
easy to update, easy to extend. If you use SublimeLinter and feel
it is making your coding life better and easier, please consider
making a donation to help fund development and support.
To donate: https://github.com/SublimeLinter/SublimeLinter3#share-the-love
Thank you!
--
Package Control Messages
========================
SublimeLinter-jshint:
--------------------
SublimeLinter-jshint
-------------------------------
This linter plugin for SublimeLinter provides an interface to jshint.
** IMPORTANT! **
Before this plugin will activate, you *must*
follow the installation instructions here:
https://github.com/SublimeLinter/SublimeLinter-jshint
-
.jshintrc 文件放在工程的根目录下:
{
"camelcase" : true,
"indent": 2,
"undef": true,
"quotmark": single,
"maxlen": 80,
"trailing": true,
"curly": true
}
----
参考资料:
http://sublimelinter.readthedocs.org/en/latest/gutter_themes.html
https://github.com/SublimeLinter/SublimeLinter-jshint
JSHint Options
http://jshint.com/docs/options/
http://cweili.gitcafe.com/jshint-options/
http://corncandy.github.io/2014/05/31/jshint-options/
--
window下得安装:
Sublime Text3安装jshint
win7 + sublime text3 + node.js
Sublime Text需安装插件:SublimeLinter 和 Sublimelinter-jshint。
Node.JS需安装包:npm install -g jshint
如果都是默认安装,以上应该就能用了。
如果Node没有安装在默认位置,在菜单里Tools -> SublimeLinter -> Open User Setting可以修改成实际安装位置。
--------------------
sublimelinter-jshinter的更多相关文章
- 在Sublime Text 3 中安装SublimeLinter,Node.js进行JS&CSS代码校验
转载自:http://www.wiibil.com/website/sublimelinter-jshint-csslint.html 在Sublime Text中安装SublimeLinter,No ...
- sublime插件@sublimelinter安装使用
sublimelinter插件是一款sublime编辑器的代码校验插件,支持多种语言,对于前端来说主要包含css和js校验. 要是用这款插件 1)安装node,然后在全局安装jshint(npm in ...
- 求教Sublime Text2 SublimeLinter插件安装问题
昨天装了 SublimeLinter插件(代码语法检测),这个事插件的地址:https://github.com/Kronuz/SublimeLinter 按照作者的介绍配置了一下,发现语法检测不起作 ...
- 借助 SublimeLinter 编写高质量的 JavaScript & CSS 代码
SublimeLinter 是前端编码利器——Sublime Text 的一款插件,用于高亮提示用户编写的代码中存在的不规范和错误的写法,支持 JavaScript.CSS.HTML.Java.PHP ...
- 在SUBLIME TEXT中安装SUBLIMELINTER进行JS&CSS代码校验
一:Sublime Text 中需要先安装Package Control.(如果有则无需安装) 安装方法:打开Sublime Text控制台(快捷键Ctrl+`),在控制台粘贴以下代码,按回车执行. ...
- 代码校验工具 SublimeLinter 的安装与使用
SublimeLinter 是 Sublime 的插件,它的作用是检查代码语法是否有错误,并提示.习惯了 IDE 下写代码的人一定需要一款在 Sublime 上类似的语法检查工具.下面我们开始. 安装 ...
- 解决Mac下SublimeLinter的Unsafe Characters警告
Mac下编辑JS文件, 如果是中文字符的行会警告: This character may get silently deleted by one or more browsers. SublimeLi ...
- sublime中安装sublimelinter php 语法检查
打开控制台,install package 搜 sublimelinter 先安装sublimelinter本体 安装完以后再搜索一下,安装sublimelinter-php 接下来,打开prefer ...
- SublimeLinter
SublimeLinter 关于代码检查 郑重推荐这个插件 官方插件库中仅有sublime3 有此插件 (对于ST2 有个sublimeLinter for ST2 没试过) SublimeLinte ...
- SublimeLinter 3中使用jshint
这货得知已久,在sublime2时期对着教程按部就班的凑合用着...不明所以. 今天无意发现SublimeLinter终于出3了,果断装之,鼓捣1个多小时,磕磕绊绊终于成功工作了.期间看了无数英文文档 ...
随机推荐
- Sql Server 判断表或数据库是否存在
发布:thebaby 来源:脚本学堂 [大 中 小] 本文详细介绍了,在sql server中判断数据库或表是否存在的方法,有理论有实例,有需要的朋友可以参考下,一定有帮助的.原文地址:h ...
- 博客迁移到www.imyzf.com
本博客已经迁移到www.imyzf.com,本站不再更新,请谅解!
- VC++对话框中添加状态栏的方法
方法一:1.添加成员变量CStatusBarCtrl m_StatusBar;2.在OnInitDialog()中加入: m_StatusBar.Create(WS_ ...
- Python设计模式——状体模式
需求,根据当前的时间,返回工作状态 #encoding=utf-8 __author__ = 'kevinlu1010@qq.com' def get_state(hour): if hour> ...
- Event Aggregator
/** * Created with JetBrains WebStorm. * User: 宇乔 * Date: 13-8-2 * Time: 下午3:01 * To change this tem ...
- Bootstrap 与 ASP.NET MVC 4 不使用 NuGet Package 笔记
转自 http://www.mytecbits.com/microsoft/dot-net/bootstrap-with-asp-net-mvc-4-step-by-step 单位最近做了一个Boot ...
- delphi xe5 android 控制蓝牙
本文部分内容摘自: http://www.pclviewer.com/android/用以下代码中的接口实现控制蓝牙的开.关及详细信息 unit Androidapi.JNI.BluetoothAda ...
- codeforces 390C Inna and Candy Boxes
这个题目看似不是很好下手,不过很容易发现每次询问的时候总是会问到第r个盒子是否有糖果: 这样的话就很好办事了: 维护两个数组: 一个sum数组:累加和: 一个in数组:如果i位是1的话,in[i]=i ...
- zepto源码学习-06 touch
先上菜,看这个模块的最后一段代码,一看就明白. ['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 'doubleTap', 't ...
- 【NOIP 2014 DAY1 T3】飞扬的小鸟(DP)
题目描述 Flappy Bird 是一款风靡一时的休闲手机游戏.玩家需要不断控制点击手机屏幕的频率来调节小鸟的飞行高度,让小鸟顺利通过画面右方的管道缝隙.如果小鸟一不小心撞到了水管或者掉在地上的话,便 ...