Created
October 8, 2013 16:07
-
-
Save dangoor/6887118 to your computer and use it in GitHub Desktop.
Preview of Coming Attractions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/brackets.settings.json b/brackets.settings.json | |
new file mode 100644 | |
index 0000000..4b5ecec | |
--- /dev/null | |
+++ b/brackets.settings.json | |
@@ -0,0 +1,10 @@ | |
+{ | |
+ "jslintOptions": { | |
+ "vars": true, | |
+ "plusplus": true, | |
+ "devel": true, | |
+ "nomen": true, | |
+ "indent": 4, | |
+ "maxerr": 50 | |
+ } | |
+} | |
\ No newline at end of file | |
diff --git a/src/extensions/default/JSLint/main.js b/src/extensions/default/JSLint/main.js | |
index bd8c750..6ca7428 100644 | |
--- a/src/extensions/default/JSLint/main.js | |
+++ b/src/extensions/default/JSLint/main.js | |
@@ -22,7 +22,6 @@ | |
*/ | |
-/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ | |
/*global define, $, JSLINT, brackets */ | |
/** | |
@@ -36,9 +35,12 @@ define(function (require, exports, module) { | |
// Load dependent modules | |
var CodeInspection = brackets.getModule("language/CodeInspection"), | |
+ PreferencesManager = brackets.getModule("preferences/PreferencesManager"), | |
Strings = brackets.getModule("strings"); | |
+ PreferencesManager.definePreference("jslintOptions", "object"); | |
+ | |
/** | |
* Run JSLint on the current document. Reports results to the main UI. Displays | |
* a gold star when no errors are found. | |
@@ -56,7 +58,8 @@ define(function (require, exports, module) { | |
} | |
text = arr.join("\n"); | |
- var jslintResult = JSLINT(text, null); | |
+ var options = PreferencesManager.getValue("jslintOptions"); | |
+ var jslintResult = JSLINT(text, options); | |
if (!jslintResult) { | |
// Remove any trailing null placeholder (early-abort indicator) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment