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

ESLint: enabled some rules #12022

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"env": {
"node": true
},
"rules": {
"no-bitwise": 0,
"no-bitwise": 2,
"curly": 2,
"eqeqeq": 2,
"guard-for-in": 0,
"wrap-iife": [2, "outside"],
"no-use-before-define": 0,
"new-cap": [0, {
"new-cap": [2, {
"capIsNewExceptions": [
"$.Deferred",
"$.Event",
Expand All @@ -19,13 +16,13 @@
"JSLINT"
]}],
"no-caller": 2,
"no-empty": 0,
"no-empty": 2,
"no-new": 2,
"no-invalid-regexp": 2,
"no-control-regex": 2,
"no-regex-spaces": 2,
"no-undef": 2,
"strict": 0,
"strict": 2,
"no-unused-vars": [0, {"vars": "all", "args": "none"}],
"semi": 2,

Expand Down Expand Up @@ -54,12 +51,15 @@
"globals": {
"brackets": false,

"console": false,

"window": false,
"alert": false,
"document": false,
"localStorage": false,
"navigator": false,
"setTimeout": false,
"clearTimeout": false,

"require": false,
"define": false,
Expand Down
6 changes: 4 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
* DEALINGS IN THE SOFTWARE.
*
*/
/*eslint-env node*/
/*global module, require*/
module.exports = function (grunt) {
'use strict';

'use strict';

module.exports = function (grunt) {
// load dependencies
require('load-grunt-tasks')(grunt, {
pattern: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,54 +20,51 @@
* DEALINGS IN THE SOFTWARE.
*
*/

/*eslint-env node*/
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, node: true */

(function () {
"use strict";
"use strict";

var open = require("open");
var open = require("open");

/**
* @private
* The Brackets domain manager for registering node extensions.
* @type {?DomainManager}
*/
var _domainManager;
/**
* @private
* The Brackets domain manager for registering node extensions.
* @type {?DomainManager}
*/
var _domainManager;

/**
* Launch the given URL in the system default browser.
* TODO: it now launching just on default browser, add launchers for specific browsers.
* @param {string} url
*/
function _cmdLaunch(url) {
open(url);
}
/**
* Launch the given URL in the system default browser.
* TODO: it now launching just on default browser, add launchers for specific browsers.
* @param {string} url
*/
function _cmdLaunch(url) {
open(url);
}


/**
* Initializes the domain and registers commands.
* @param {DomainManager} domainManager The DomainManager for the server
*/
function init(domainManager) {
_domainManager = domainManager;
if (!domainManager.hasDomain("launcher")) {
domainManager.registerDomain("launcher", {major: 0, minor: 1});
}
domainManager.registerCommand(
"launcher", // domain name
"launch", // command name
_cmdLaunch, // command handler function
false, // this command is synchronous in Node
"Launches a given HTML file in the browser for live development",
[
{ name: "url", type: "string", description: "file:// url to the HTML file" },
{ name: "browser", type: "string", description: "browser name"}
],
[]
);
/**
* Initializes the domain and registers commands.
* @param {DomainManager} domainManager The DomainManager for the server
*/
function init(domainManager) {
_domainManager = domainManager;
if (!domainManager.hasDomain("launcher")) {
domainManager.registerDomain("launcher", {major: 0, minor: 1});
}
domainManager.registerCommand(
"launcher", // domain name
"launch", // command name
_cmdLaunch, // command handler function
false, // this command is synchronous in Node
"Launches a given HTML file in the browser for live development",
[
{ name: "url", type: "string", description: "file:// url to the HTML file" },
{ name: "browser", type: "string", description: "browser name"}
],
[]
);
}

exports.init = init;

}());
exports.init = init;
Loading