Skip to content
Merged
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
31 changes: 8 additions & 23 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,38 +1,23 @@
{
"plugins": [
"no-tabs",
"react"
],
"rules": {
"indent": [2, 2], // check 2 space indentation
"no-mixed-spaces-and-tabs": [2],
"quotes": [2, "double"],
"semi": [1, "always"],

"no-tabs/at-all": [2],
// disabled rule which enforce unix or windows line breaks
"linebreak-style": [0],

"react/display-name": 2,
"react/prop-types": 0,
// disabled comma-dangle is safe for our use case
"comma-dangle": [0],

"indent": [0, 2],
"linebreak-style": [0],
// disabled eqeqeq and no-use-before-define are safe if you use them correctly
"eqeqeq": [0],
"new-cap": [0],
"no-new": [0],
"comma-dangle": [0],
"no-use-before-define": [0]
"no-use-before-define": [0],
},
"env": {
"es6": true,
"browser": true,
"amd": true
"es6": true
},
"globals": {
"define": true,
"require": true,
"requirejs": true,

"Str": true,
"Locale": true,
"Options": true
}
}
35 changes: 35 additions & 0 deletions data/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// extends common eslintrc config with "javascript running in a content context" specific configs
{
"extends": "../.eslintrc",
"plugins": [
// prevents tab whitespace when 'indent' rule is disabled
"no-tabs",
"react"
],
"env": {
// enable browser & amd conventions
"browser": true,
"amd": true
},
"rules": {
// disabled due to conflicts with special indentation in requirejs modules
"indent": 0,
// prevents any usage of tab whitespaces
"no-tabs/at-all": [2],

// force definition of displayName on React components
"react/display-name": 2,

// TODO: force propTypes on React Components
"react/prop-types": 0,

// disabled due to conflicts with capitalized React components names
"new-cap": [0],
},
"globals": {
// firebug.sdk globals
"Str": true,
"Locale": true,
"Options": true
}
}
2 changes: 2 additions & 0 deletions data/inspector/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* See license.txt for terms of usage */

/* globals requirejs */

// RequireJS configuration
require.config({
baseUrl: ".",
Expand Down
3 changes: 3 additions & 0 deletions data/inspector/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,12 @@ theApp = React.render(MainTabbedArea({

// Helper modules for handling application events.
packetsStore = new PacketsStore(window, theApp);

/* eslint-disable no-new */
new ActorsStore(window, theApp);
new Resizer(window, theApp);
new Search(window, theApp);
/* eslint-enable */

// Send notification about initialization being done.
postChromeMessage("initialized");
Expand Down
7 changes: 7 additions & 0 deletions karma-tests/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// extends data eslintrc config with karma tests specific configs
{
"extends": "../data/.eslintrc",
"env": {},
"rules": {},
"globals": {}
}
18 changes: 18 additions & 0 deletions lib/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// extends common eslintrc config with addon-sdk specific configs
{
"extends": "../.eslintrc",
"env": {
// commonjs conventions
"node": true
},
"rules": {
"global-strict": 0,
"dot-notation": 0,
"new-cap": 0,
"no-underscore-dangle": 0
},
"globals": {
// firebug.sdk globals
"FBTrace": true
}
}
4 changes: 0 additions & 4 deletions lib/inspector-actor.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@

/* See license.txt for terms of usage */

/* globals exports */
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */

"use strict";

// Add-on SDK
Expand Down
3 changes: 0 additions & 3 deletions lib/inspector-front.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* See license.txt for terms of usage */

/* globals exports, module */
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */

"use strict";

module.metadata = {
Expand Down
7 changes: 2 additions & 5 deletions lib/inspector-service.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* See license.txt for terms of usage */

/* globals exports, module */
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */

"use strict";

module.metadata = {
Expand Down Expand Up @@ -108,14 +105,14 @@ const InspectorService =
then(({registrar, front}) => {
this.globalRegistrar = registrar;
return front;
});
});

// Register as tab actor.
let tab = Rdp.registerTabActor(client, config).
then(({registrar, front}) => {
this.tabRegistrar = registrar;
return front;
});
});

// Wait till both registrations are done.
all([global, tab]).then(results => {
Expand Down
3 changes: 0 additions & 3 deletions lib/inspector-window.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* See license.txt for terms of usage */

/* globals exports, module, FBTrace */
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */

"use strict";

module.metadata = {
Expand Down
3 changes: 0 additions & 3 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* See license.txt for terms of usage */

/* globals exports, module */
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */

"use strict";

// Firebug.SDK
Expand Down
3 changes: 0 additions & 3 deletions lib/start-button.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* See license.txt for terms of usage */

/* globals exports, module */
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */

"use strict";

module.metadata = {
Expand Down
3 changes: 0 additions & 3 deletions lib/toolbox-overlay.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* See license.txt for terms of usage */

/* globals exports, module */
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */

"use strict";

module.metadata = {
Expand Down
3 changes: 0 additions & 3 deletions lib/transport-observer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* See license.txt for terms of usage */

/* globals exports, module */
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */

"use strict";

module.metadata = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"jpm-tests": "jpm test",
"travis-ci": "npm run karma-coverage && npm run lint",
"lint-content": "eslint data/inspector && eslint karma-tests/",
"lint-addon": "eslint --env node lib",
"lint-addon": "eslint lib",
"lint": "npm run lint-content && npm run lint-addon"
},
"engines": {
Expand Down