forked from noseglid/atom-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jshintrc
48 lines (45 loc) · 2.26 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
{
// 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": false, // 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.
"esnext": true,
// 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 that are not defined per default
"window": false,
"navigator": false,
"XMLHttpRequest": false,
"document": false,
"atom": false,
"module": false,
// Jasmine
"jasmine": false,
"before": false,
"beforeEach": false,
"after": false,
"afterEach": false,
"describe": false,
"it": false,
"xit": false,
"waits": false,
"waitsFor": false,
"waitsForPromise": false,
"runs": false,
"expect": false
},
// Misc.
"white": true, // Enforce Crockford style guides
"indent": 2 // Set indentation to two spaces
}