Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit ad8e1ed

Browse files
authored
Merge pull request #12718 from ficristo/strict
ESLint: enable strict rule
2 parents be62881 + 8370a08 commit ad8e1ed

File tree

21 files changed

+1294
-1299
lines changed

21 files changed

+1294
-1299
lines changed

.eslintrc.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"env": {
3-
"node": true
4-
},
52
"rules": {
63
"no-bitwise": 0,
74
"curly": 2,
@@ -25,7 +22,7 @@
2522
"no-control-regex": 2,
2623
"no-regex-spaces": 2,
2724
"no-undef": 2,
28-
"strict": 0,
25+
"strict": 2,
2926
"no-unused-vars": [0, {"vars": "all", "args": "none"}],
3027
"semi": 2,
3128

@@ -59,6 +56,7 @@
5956
"$": false,
6057

6158
"window": false,
59+
"console": false,
6260
"setTimeout": false,
6361
"clearTimeout": false,
6462

Gruntfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
*
2222
*/
2323

24+
/*eslint-env node */
2425
/*jslint node: true */
26+
'use strict';
2527

2628
module.exports = function (grunt) {
27-
'use strict';
28-
2929
// load dependencies
3030
require('load-grunt-tasks')(grunt, {
3131
pattern: [

src/LiveDevelopment/MultiBrowserImpl/launchers/node/LauncherDomain.js

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -21,53 +21,50 @@
2121
*
2222
*/
2323

24+
/*eslint-env node */
2425
/*jslint node: true */
26+
"use strict";
2527

26-
(function () {
27-
"use strict";
28+
var open = require("opn");
2829

29-
var open = require("opn");
30-
31-
/**
32-
* @private
33-
* The Brackets domain manager for registering node extensions.
34-
* @type {?DomainManager}
35-
*/
36-
var _domainManager;
30+
/**
31+
* @private
32+
* The Brackets domain manager for registering node extensions.
33+
* @type {?DomainManager}
34+
*/
35+
var _domainManager;
3736

38-
/**
39-
* Launch the given URL in the system default browser.
40-
* TODO: it now launching just on default browser, add launchers for specific browsers.
41-
* @param {string} url
42-
*/
43-
function _cmdLaunch(url) {
44-
open(url);
45-
}
37+
/**
38+
* Launch the given URL in the system default browser.
39+
* TODO: it now launching just on default browser, add launchers for specific browsers.
40+
* @param {string} url
41+
*/
42+
function _cmdLaunch(url) {
43+
open(url);
44+
}
4645

4746

48-
/**
49-
* Initializes the domain and registers commands.
50-
* @param {DomainManager} domainManager The DomainManager for the server
51-
*/
52-
function init(domainManager) {
53-
_domainManager = domainManager;
54-
if (!domainManager.hasDomain("launcher")) {
55-
domainManager.registerDomain("launcher", {major: 0, minor: 1});
56-
}
57-
domainManager.registerCommand(
58-
"launcher", // domain name
59-
"launch", // command name
60-
_cmdLaunch, // command handler function
61-
false, // this command is synchronous in Node
62-
"Launches a given HTML file in the browser for live development",
63-
[
64-
{ name: "url", type: "string", description: "file:// url to the HTML file" },
65-
{ name: "browser", type: "string", description: "browser name"}
66-
],
67-
[]
68-
);
47+
/**
48+
* Initializes the domain and registers commands.
49+
* @param {DomainManager} domainManager The DomainManager for the server
50+
*/
51+
function init(domainManager) {
52+
_domainManager = domainManager;
53+
if (!domainManager.hasDomain("launcher")) {
54+
domainManager.registerDomain("launcher", {major: 0, minor: 1});
6955
}
56+
domainManager.registerCommand(
57+
"launcher", // domain name
58+
"launch", // command name
59+
_cmdLaunch, // command handler function
60+
false, // this command is synchronous in Node
61+
"Launches a given HTML file in the browser for live development",
62+
[
63+
{ name: "url", type: "string", description: "file:// url to the HTML file" },
64+
{ name: "browser", type: "string", description: "browser name"}
65+
],
66+
[]
67+
);
68+
}
7069

71-
exports.init = init;
72-
73-
}());
70+
exports.init = init;

0 commit comments

Comments
 (0)