Skip to content

Commit 80b692d

Browse files
committed
Merge pull request airbnb#10 from airbnb/sublime-linter-settings
Add SublimeLinter settings that match the current JS rules in README.md
2 parents 0e55858 + 46d19c2 commit 80b692d

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* Airbnb JSHint for settings for use with SublimeLinter and Sublime Text 2.
3+
*
4+
* 1. Install SublimeLinter at https://github.com/SublimeLinter/SublimeLinter
5+
* 2. Open user preferences for the SublimeLinter package in Sublime Text 2
6+
* * For Mac OS X go to _Sublime Text 2_ > _Preferences_ > _Package Settings_ > _SublimeLinter_ > _Settings - User_
7+
* 3. Paste the contents of this file into your settings file
8+
* 4. Save the settings file
9+
*
10+
* @version 0.1.0
11+
* @see https://github.com/SublimeLinter/SublimeLinter
12+
* @see http://www.jshint.com/docs/
13+
*/
14+
{
15+
"jshint_options":
16+
{
17+
/*
18+
* ENVIRONMENTS
19+
* =================
20+
*/
21+
22+
// Defines globals exposed by modern browsers.
23+
"browser": true,
24+
25+
// Defines globals exposed by jQuery.
26+
"jquery": true,
27+
28+
/*
29+
* ENFORCING OPTIONS
30+
* =================
31+
*/
32+
33+
// Prohibits the use of == and != in favor of === and !==.
34+
"eqeqeq": true,
35+
36+
// Suppresses warnings about == null comparisons.
37+
"eqnull": true,
38+
39+
// Enforces a tab width of 2 spaces.
40+
"indent": 2,
41+
42+
// Prohibits the use of a variable before it was defined.
43+
"latedef": true,
44+
45+
// $equires you to capitalize names of constructor functions.
46+
"newcap": true,
47+
48+
// Makes it an error to leave a trailing whitespace in your code.
49+
"trailing": true,
50+
51+
// Prohibits the use of explicitly undeclared variables.
52+
"undef": true,
53+
54+
// Warns when you define and never use your variables.
55+
"unused": true
56+
}
57+
}

0 commit comments

Comments
 (0)