-
Notifications
You must be signed in to change notification settings - Fork 4
/
.jshintrc
57 lines (57 loc) · 1.65 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"bitwise": false , //禁用位运算符
"curly": true, //表达式都需要大括号{}
"freeze": true, //禁止复写原生对象(如Array, Date)的原型
"quotmark": "double", //引号状态
"newcap": true, //构造函数名首字母必须大写
"undef":true,//禁止使用不在全局变量列表中的未定义的变量
"unused": true, //禁止使用未通过var声明的变量
"maxparams": 4,
"maxdepth": 4,
"debug":false,
"evil":false,
"forin":false, //for in hasOwnPropery检查
"nomen":false,
"onevar":true,
"plusplus":false,//禁止使用++和--
"sub" :true, //允许person['name']
"strict":false, //严格模式
"asi":false,//值为true时,忽略检查没有加分号(;)的行尾
"latedef": "nofunc", //禁止定义之前使用变量
//增强参数 -- 本类参数设为true,JSHint会产生更多告警。
"eqeqeq":false, //强等于,使用===和!==替代==和!=
"forin": false, //for in hasOwnPropery检查
"freeze": false, //禁止复写原生对象(如Array, Date)的原型
"latedef": "nofunc", //禁止定义之前使用变量,跟下面的要一起用
"maxerr": 100, //JSHint中断扫描前允许的最大错误数
//自己定义的全局变量
"globals":{
"kit": true,
"jQuery":true,
"Zepto":true,
"console":true,
"$":true,
"asdf":true,
"window":true,
"require":true,
"_": true,
"F7": true,
"app": true,
"i18next": true,
"setTimeout": true,
"setInterval": true,
"Template7": true,
"document": true,
"keyPartCommon": true,
"util": true,
"mainView": true,
"clearTimeout": true,
"clearInterval": true,
"sessionStorage": true,
"localStorage":true,
"module":true,
"exports":true,
"aaa": true,
"mqttLib": true
}
}