Skip to content

Commit 05cc7ec

Browse files
sgupta7857sgupta7857
authored andcommitted
changes
1 parent a56e0dc commit 05cc7ec

File tree

1 file changed

+5
-10
lines changed
  • src/extensions/default/Brackets-InteractiveLinter

1 file changed

+5
-10
lines changed

src/extensions/default/Brackets-InteractiveLinter/main.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ define(function (require, exports, module) {
2121
linterManager = require("linterManager"),
2222
pluginManager = require("pluginManager");
2323

24-
function addEnabledPref() {
25-
preferences.definePreference("enabled", "boolean", true);
26-
}
27-
28-
require("lintIndicator");
24+
require("lintIndicator");
2925
require("lintPanel");
3026
require("linterSettings");
3127

@@ -157,7 +153,7 @@ define(function (require, exports, module) {
157153

158154

159155
function init(){
160-
CodeInspection.register("javascript", {
156+
CodeInspection.register("javascript", {
161157
name: "interactive-linter-remove-jslint",
162158
scanFile: $.noop
163159
});
@@ -194,17 +190,16 @@ define(function (require, exports, module) {
194190

195191

196192
function appReady() {
197-
addEnabledPref()
193+
preferences.definePreference("enabled", "boolean", true);
198194
if (preferences.get("enabled")) {
199195
init();
200-
}
201-
else {
196+
} else {
202197
preferences.on("change", function handleChange(){
203198
if(preferences.get("enabled")) {
204199
preferences.off("change", handleChange);
205200
init();
206201
}
207-
});
202+
});
208203
}
209204
}
210205
});

0 commit comments

Comments
 (0)