Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit 21d278b

Browse files
committed
(master) added jshintrc and updated the options to more accurately reflect current standards
1 parent a48741a commit 21d278b

2 files changed

Lines changed: 119 additions & 38 deletions

File tree

linters/SublimeLinter/SublimeLinter.sublime-settings

Lines changed: 53 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,56 +12,71 @@
1212
* @see http://www.jshint.com/docs/
1313
*/
1414
{
15-
"jshint_options":
16-
{
17-
/*
18-
* ENVIRONMENTS
19-
* =================
20-
*/
15+
"jshint_options":
16+
{
17+
/*
18+
* ENVIRONMENTS
19+
* =================
20+
*/
2121

22-
// Define globals exposed by modern browsers.
23-
"browser": true,
22+
// Define globals exposed by modern browsers.
23+
"browser": true,
2424

25-
// Define globals exposed by jQuery.
26-
"jquery": true,
25+
// Define globals exposed by jQuery.
26+
"jquery": true,
2727

28-
// Define globals exposed by Node.js.
29-
"node": true,
28+
// Define globals exposed by Node.js.
29+
"node": true,
3030

31-
/*
32-
* ENFORCING OPTIONS
33-
* =================
34-
*/
31+
/*
32+
* ENFORCING OPTIONS
33+
* =================
34+
*/
3535

36-
// Force all variable names to use either camelCase style or UPPER_CASE
37-
// with underscores.
38-
"camelcase": true,
36+
// Force all variable names to use either camelCase style or UPPER_CASE
37+
// with underscores.
38+
"camelcase": true,
3939

40-
// Prohibit use of == and != in favor of === and !==.
41-
"eqeqeq": true,
40+
// Always require curly braces
41+
"curly" : true,
4242

43-
// Suppress warnings about == null comparisons.
44-
"eqnull": true,
43+
// Prohibit use of == and != in favor of === and !==.
44+
"eqeqeq": true,
4545

46-
// Enforce tab width of 2 spaces.
47-
"indent": 2,
46+
// Keep people from breaking JavaScript (no overwriting prototypes of native objects)
47+
"freeze": true,
4848

49-
// Prohibit use of a variable before it is defined.
50-
"latedef": true,
49+
// Enforce tab width of 2 spaces.
50+
"indent": 4,
5151

52-
// Require capitalized names for constructor functions.
53-
"newcap": true,
52+
// Prohibit use of a variable before it is defined.
53+
"latedef": true,
5454

55-
// Enforce use of single quotation marks for strings.
56-
"quotmark": "single",
55+
// Require capitalized names for constructor functions.
56+
"newcap": true,
5757

58-
// Prohibit trailing whitespace.
59-
"trailing": true,
58+
// Enforce use of single quotation marks for strings.
59+
"quotmark": "single",
6060

61-
// Prohibit use of explicitly undeclared variables.
62-
"undef": true,
61+
// Prohibit use of explicitly undeclared variables.
62+
"undef": true,
6363

64-
// Warn when variables are defined but never used.
65-
"unused": true
66-
}
64+
// Warn when variables are defined but never used.
65+
"unused": true,
66+
67+
// Enforce placing 'use strict' at the top function scope
68+
"strict": true,
69+
70+
// Prohibit trailing whitespace.
71+
"trailing": true,
72+
73+
74+
/*
75+
* RELAXING OPTIONS
76+
* =================
77+
*/
78+
79+
// Suppress warnings about == null comparisons.
80+
"eqnull": true
81+
}
6782
}

linters/jshintrc

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
/*
3+
* ENVIRONMENTS
4+
* =================
5+
*/
6+
7+
// Define globals exposed by modern browsers.
8+
"browser": true,
9+
10+
// Define globals exposed by jQuery.
11+
"jquery": true,
12+
13+
// Define globals exposed by Node.js.
14+
"node": true,
15+
16+
/*
17+
* ENFORCING OPTIONS
18+
* =================
19+
*/
20+
21+
// Force all variable names to use either camelCase style or UPPER_CASE
22+
// with underscores.
23+
"camelcase": true,
24+
25+
// Always require curly braces
26+
"curly" : true,
27+
28+
// Prohibit use of == and != in favor of === and !==.
29+
"eqeqeq": true,
30+
31+
// Keep people from breaking JavaScript (no overwriting prototypes of native objects)
32+
"freeze": true,
33+
34+
// Enforce tab width of 2 spaces.
35+
"indent": 4,
36+
37+
// Prohibit use of a variable before it is defined.
38+
"latedef": true,
39+
40+
// Require capitalized names for constructor functions.
41+
"newcap": true,
42+
43+
// Enforce use of single quotation marks for strings.
44+
"quotmark": "single",
45+
46+
// Prohibit use of explicitly undeclared variables.
47+
"undef": true,
48+
49+
// Warn when variables are defined but never used.
50+
"unused": true,
51+
52+
// Enforce placing 'use strict' at the top function scope
53+
"strict": true,
54+
55+
// Prohibit trailing whitespace.
56+
"trailing": true,
57+
58+
59+
/*
60+
* RELAXING OPTIONS
61+
* =================
62+
*/
63+
64+
// Suppress warnings about == null comparisons.
65+
"eqnull": true
66+
}

0 commit comments

Comments
 (0)