forked from qiniu/js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jshintrc
40 lines (36 loc) · 1.8 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
/*************************************************************
* JSHint Docs:
* http://www.jshint.com/docs
*
* NOTICE: All of our javascript file should pass check of jsHint.
*
* by MaYiqing
*************************************************************/
{
// Global objects
"predef": [
"Q", // global namespace
"model", // UserViewModel
"ko", // knockout.js
"Highcharts", // highcharts.js
"phpjs", // php.js
"_bucketName" // defined in bucket_box_layout.html
],
// Enforcing options
//"quotmark": "single", // always use single quotes
"noarg": true, // forbiden arguments.calle and arguments.caller
"noempty": true, // don't let statements blocks empty
"eqeqeq": true, // always use === to compare
"undef": true, // don't use undefined object
"unused": "vars", // warning when there are some var never use in the file
"curly": true, // always put curly braces around blocks in loops and conditionals
"forin": true, // use hasOwnProperty when use "for(key in obj){}"
"newcap": true, // must capitalize names of constructor functions
// Relaxing options
"expr": true, // suppresses warnings about the use of expressions where function calls
"boss": true, // suppresses warnings about the use of assignments in cases where comparisons are expected
// Enviroments
"browser": true, // globals exposed by modern browsers, like document, window, etc.
"devel": true, // globals that are usually used for logging poor-man's debugging: console, alert, etc.
"jquery": true // jquery library
}