-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jshintrc
27 lines (27 loc) · 1.51 KB
/
.jshintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"node": true,//node环境
"jquery": true,// jQuery 环境
"browser": true,// 基于现代浏览器
"esnext": true,// 告诉JSHint用 ECMAScript 6 规范检测js代码
"bitwise": true,//禁用位运算操作,提高代码执行效率
"camelcase": true,//使用驼峰式命名
"curly": true,//if、while、for等必须加上{}
"eqeqeq": true,//用 === 代替 == ,用 !== 代替 !=
"freeze": true,// 当复写对象prototype存在的方法时,会提示错误警告。
"immed": true,// 立即调用函数表达式时,需要用()包裹函数
"indent": 2,// 代码排版缩进两个空格
"latedef": "nofunc",//在调用变量或函数时,必须确保这些变量和函数在调用之前已经声明过,也就是说声明代码必须写在调用代码的前面,而不能写在后面,设为nofunc 允许函数放在调用之后
"newcap": true,// 一个构造函数当类使用时,首字符需要大写
"noarg": true,// 不允许使用arguments.caller和arguments.callee。
"quotmark": "single",// 使用单引号
"regexp": true,// 则正则中不允许使用 . 或者 [^…]
"undef": true,// 变量必须先声明后才能使用
"unused": "vars",// 表示如果声明了变量,但没有使用,会提示错误警告的。设为vars不会坚持函数的参数
"strict": true,// 表明jsHint会要求你使用use strict;语法
"trailing": true,// 不能用 \ 定义多行字符串
"smarttabs": true,// 不能混合使用tab和空格
"forin": true,
"globals": {
"angular": false
}
}