-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.jshintrc
38 lines (34 loc) · 1.91 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
{
// Restricting options
"strict": true, // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode
"trailing": true, // Makes it an error to leave a trailing whitespace in your code.
"curly": true, // Force braces around blocks in loops and conditionals.
"undef": true, // Prohibits the use of explicitly undeclared variables. Use /*global ... */ for exceptions
"latedef": "nofunc", // Prohibits the use of a variable before it has been defined.
"unused": "vars", // Warns when you define and never use your variables.
"newcap": true, // Forces you to capitalize names of constructor functions.
"noarg": true, // Prohibits the use of arguments.caller and arguments.callee, which are deprecated in EcmaScript 5.
"quotmark": "single", // Force single quotes for strings
// Relaxing options
"expr": true, // Allow expressions where normally you would expect to see assignments or function calls.
"onecase": true, // Allow switches with only one case (not counting default)
"sub": true, // Allow using [] notation when it can also be expressed in dot notation: person['name'] vs. person.name.
// Environment
"node": true, // Define common browser globals: require, nodule, etc.
"devel": true, // Define globals that are usually used for debugging: console, alert, etc.
"globals": { // Define globals introduced by non-AMD compatible modules
"Promise": true,
"__rootDir": true,
"config": true,
/* MOCHA */
"describe" : false,
"it" : false,
"before" : false,
"beforeEach" : false,
"after" : false,
"afterEach" : false
},
// Misc.
"white": true, // Enforce Crockford style guides
"indent": 2 // Set indentation to two spaces
}