Skip to content

Commit 2e75e0b

Browse files
committed
Merge branch 'master' of github.com:firebug/rdp-inspector
2 parents 0755785 + 1ba09e0 commit 2e75e0b

15 files changed

+76
-51
lines changed

.eslintrc

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,23 @@
11
{
2-
"plugins": [
3-
"no-tabs",
4-
"react"
5-
],
62
"rules": {
3+
"indent": [2, 2], // check 2 space indentation
74
"no-mixed-spaces-and-tabs": [2],
85
"quotes": [2, "double"],
96
"semi": [1, "always"],
107

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

13-
"react/display-name": 2,
14-
"react/prop-types": 0,
11+
// disabled comma-dangle is safe for our use case
12+
"comma-dangle": [0],
1513

16-
"indent": [0, 2],
17-
"linebreak-style": [0],
14+
// disabled eqeqeq and no-use-before-define are safe if you use them correctly
1815
"eqeqeq": [0],
19-
"new-cap": [0],
20-
"no-new": [0],
21-
"comma-dangle": [0],
22-
"no-use-before-define": [0]
16+
"no-use-before-define": [0],
2317
},
2418
"env": {
25-
"es6": true,
26-
"browser": true,
27-
"amd": true
19+
"es6": true
2820
},
2921
"globals": {
30-
"define": true,
31-
"require": true,
32-
"requirejs": true,
33-
34-
"Str": true,
35-
"Locale": true,
36-
"Options": true
3722
}
3823
}

data/.eslintrc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// extends common eslintrc config with "javascript running in a content context" specific configs
2+
{
3+
"extends": "../.eslintrc",
4+
"plugins": [
5+
// prevents tab whitespace when 'indent' rule is disabled
6+
"no-tabs",
7+
"react"
8+
],
9+
"env": {
10+
// enable browser & amd conventions
11+
"browser": true,
12+
"amd": true
13+
},
14+
"rules": {
15+
// disabled due to conflicts with special indentation in requirejs modules
16+
"indent": 0,
17+
// prevents any usage of tab whitespaces
18+
"no-tabs/at-all": [2],
19+
20+
// force definition of displayName on React components
21+
"react/display-name": 2,
22+
23+
// TODO: force propTypes on React Components
24+
"react/prop-types": 0,
25+
26+
// disabled due to conflicts with capitalized React components names
27+
"new-cap": [0],
28+
},
29+
"globals": {
30+
// firebug.sdk globals
31+
"Str": true,
32+
"Locale": true,
33+
"Options": true
34+
}
35+
}

data/inspector/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* See license.txt for terms of usage */
22

3+
/* globals requirejs */
4+
35
// RequireJS configuration
46
require.config({
57
baseUrl: ".",

data/inspector/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,12 @@ theApp = React.render(MainTabbedArea({
156156

157157
// Helper modules for handling application events.
158158
packetsStore = new PacketsStore(window, theApp);
159+
160+
/* eslint-disable no-new */
159161
new ActorsStore(window, theApp);
160162
new Resizer(window, theApp);
161163
new Search(window, theApp);
164+
/* eslint-enable */
162165

163166
// Send notification about initialization being done.
164167
postChromeMessage("initialized");

karma-tests/.eslintrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// extends data eslintrc config with karma tests specific configs
2+
{
3+
"extends": "../data/.eslintrc",
4+
"env": {},
5+
"rules": {},
6+
"globals": {}
7+
}

lib/.eslintrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// extends common eslintrc config with addon-sdk specific configs
2+
{
3+
"extends": "../.eslintrc",
4+
"env": {
5+
// commonjs conventions
6+
"node": true
7+
},
8+
"rules": {
9+
"global-strict": 0,
10+
"dot-notation": 0,
11+
"new-cap": 0,
12+
"no-underscore-dangle": 0
13+
},
14+
"globals": {
15+
// firebug.sdk globals
16+
"FBTrace": true
17+
}
18+
}

lib/inspector-actor.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
21
/* See license.txt for terms of usage */
32

4-
/* globals exports */
5-
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */
6-
73
"use strict";
84

95
// Add-on SDK

lib/inspector-front.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
/* See license.txt for terms of usage */
22

3-
/* globals exports, module */
4-
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */
5-
63
"use strict";
74

85
module.metadata = {

lib/inspector-service.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
/* See license.txt for terms of usage */
22

3-
/* globals exports, module */
4-
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */
5-
63
"use strict";
74

85
module.metadata = {
@@ -108,14 +105,14 @@ const InspectorService =
108105
then(({registrar, front}) => {
109106
this.globalRegistrar = registrar;
110107
return front;
111-
});
108+
});
112109

113110
// Register as tab actor.
114111
let tab = Rdp.registerTabActor(client, config).
115112
then(({registrar, front}) => {
116113
this.tabRegistrar = registrar;
117114
return front;
118-
});
115+
});
119116

120117
// Wait till both registrations are done.
121118
all([global, tab]).then(results => {

lib/inspector-window.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
/* See license.txt for terms of usage */
22

3-
/* globals exports, module, FBTrace */
4-
/* eslint global-strict: 0, dot-notation: 0, new-cap: 0, no-underscore-dangle: 0 */
5-
63
"use strict";
74

85
module.metadata = {

0 commit comments

Comments
 (0)