This repository has been archived by the owner on Jan 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
/
.jshintrc
43 lines (40 loc) · 2.08 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
{
// 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": true, // 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
"browser": true, // Define common browser globals: document, navigator, etc.
"devel": true, // Define globals that are usually used for debugging: console, alert, etc.
"globals": { // Define globals introduced by non-AMD compatible modules
"require": true,
"define": true,
"describe": true,
"xdescribe": true,
"it": true,
"xit": true,
"runs": true,
"waits": true,
"waitsFor": true,
"expect": true,
"beforeEach": true,
"afterEach": true,
"sinon": true,
"jasmine": true,
"__dirname": true,
"module": false
},
// Misc.
"white": true, // Enforce Crockford style guides
"indent": 2 // Set indentation to two spaces
}