Skip to content

Commit b65dd90

Browse files
committed
Add .jshintrc
This adds a `.jshintrc` to the `linters/` directory. I just copied over the settings from the `SublimeLinter` file, de-nesting the JSON object by one level. It means we'll have to maintain both files, but it's good to have a basic `.jshintrc` for those of us that aren't using JSHint through Sublime Text.
1 parent 5d99903 commit b65dd90

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

linters/jshintrc

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
// Prohibit use of == and != in favor of === and !==.
26+
"eqeqeq": true,
27+
28+
// Suppress warnings about == null comparisons.
29+
"eqnull": true,
30+
31+
// Enforce tab width of 2 spaces.
32+
"indent": 2,
33+
34+
// Prohibit use of a variable before it is defined.
35+
"latedef": true,
36+
37+
// Require capitalized names for constructor functions.
38+
"newcap": true,
39+
40+
// Enforce use of single quotation marks for strings.
41+
"quotmark": "single",
42+
43+
// Prohibit trailing whitespace.
44+
"trailing": true,
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 line length to 80 characters
53+
"maxlen": 80,
54+
55+
// Enforce placing 'use strict' at the top function scope
56+
"strict": true
57+
}

0 commit comments

Comments
 (0)