---

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的更多相关文章

  1. 在Sublime Text 3 中安装SublimeLinter,Node.js进行JS&CSS代码校验

    转载自:http://www.wiibil.com/website/sublimelinter-jshint-csslint.html 在Sublime Text中安装SublimeLinter,No ...

  2. sublime插件@sublimelinter安装使用

    sublimelinter插件是一款sublime编辑器的代码校验插件,支持多种语言,对于前端来说主要包含css和js校验. 要是用这款插件 1)安装node,然后在全局安装jshint(npm in ...

  3. 求教Sublime Text2 SublimeLinter插件安装问题

    昨天装了 SublimeLinter插件(代码语法检测),这个事插件的地址:https://github.com/Kronuz/SublimeLinter 按照作者的介绍配置了一下,发现语法检测不起作 ...

  4. 借助 SublimeLinter 编写高质量的 JavaScript & CSS 代码

    SublimeLinter 是前端编码利器——Sublime Text 的一款插件,用于高亮提示用户编写的代码中存在的不规范和错误的写法,支持 JavaScript.CSS.HTML.Java.PHP ...

  5. 在SUBLIME TEXT中安装SUBLIMELINTER进行JS&CSS代码校验

    一:Sublime Text 中需要先安装Package Control.(如果有则无需安装) 安装方法:打开Sublime Text控制台(快捷键Ctrl+`),在控制台粘贴以下代码,按回车执行. ...

  6. 代码校验工具 SublimeLinter 的安装与使用

    SublimeLinter 是 Sublime 的插件,它的作用是检查代码语法是否有错误,并提示.习惯了 IDE 下写代码的人一定需要一款在 Sublime 上类似的语法检查工具.下面我们开始. 安装 ...

  7. 解决Mac下SublimeLinter的Unsafe Characters警告

    Mac下编辑JS文件, 如果是中文字符的行会警告: This character may get silently deleted by one or more browsers. SublimeLi ...

  8. sublime中安装sublimelinter php 语法检查

    打开控制台,install package 搜 sublimelinter 先安装sublimelinter本体 安装完以后再搜索一下,安装sublimelinter-php 接下来,打开prefer ...

  9. SublimeLinter

    SublimeLinter 关于代码检查 郑重推荐这个插件 官方插件库中仅有sublime3 有此插件 (对于ST2 有个sublimeLinter for ST2 没试过) SublimeLinte ...

  10. SublimeLinter 3中使用jshint

    这货得知已久,在sublime2时期对着教程按部就班的凑合用着...不明所以. 今天无意发现SublimeLinter终于出3了,果断装之,鼓捣1个多小时,磕磕绊绊终于成功工作了.期间看了无数英文文档 ...

随机推荐

  1. php实现单链表

    <?php /** * 单链表 */ class Demo { private $id; public $name; public $next; public function __constr ...

  2. django1.6之创建用户

    如何你运行python manager.py syncdb(数据库同步成功) 则运行一下代码 >>> from django.contrib.auth.models import U ...

  3. 2014年辛星完全解读Javascript第一节

    ***************概述*************** 1.Javascript是一种原型化继承的基于对象的动态类型的脚本语言,它区分大小写,主要运行在客户端,用户即使响应用户的操作并进行数 ...

  4. Unity3d Shader开发(四)UsePass ,GrabPass ,SubShader Tags

    (一)UsePass 命令 使用 来自另一个着色器的命名通道. Syntax 语法 UsePass "Shader/Name" 插入所有来自给定着色器中的给定名字的通道.Shade ...

  5. Amazon Alexa 语音识别1 : 简介

    Alexa是Amazon自家的语音识别技术,需要配合自家的Echo音箱使用.开发者可以在Amazon上建立自己的程序(Skill)来连接到自己的应用或是硬件.例如,用户家里有一套xx牌的智能灯,现在希 ...

  6. hdu 3333 Turing Tree 图灵树(线段树 + 二分离散)

    http://acm.hdu.edu.cn/showproblem.php?pid=3333 Turing Tree Time Limit: 6000/3000 MS (Java/Others)    ...

  7. poj 2440 (找递推公式)

    http://poj.org/problem?id=2440 DNA Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3254 ...

  8. tomcat session思考

    最近在做统计服务器在线人数时,按照当前服务器session数量来实现,具体方法:实现HttpSessionListener接口来,每次sessionCreate的时候增加1,sessionDestro ...

  9. C#.NET连接mysql方法

    C#访问MySQL数据库的方法 (1)首先需要下载C#访问MySQL数据库的ADO.NET驱动程序 下载地址为: http://dev.mysql.com/downloads/connector/ne ...

  10. Codeforces Round #209 (Div. 2)

    A: 要么是两次要么4次,判断是否在边界: #include<cstdio> using namespace std; int main() { int n,m,x; ; scanf(&q ...