Skip to content

Commit 93a4265

Browse files
committed
fixed eslint errors
1 parent fcbe354 commit 93a4265

File tree

10 files changed

+20
-15
lines changed

10 files changed

+20
-15
lines changed

src/app/__tests__/ButtonsContainer.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/jsx-filename-extension */
12
import { shallow, configure } from 'enzyme';
23
import React from 'react';
34
import Adapter from 'enzyme-adapter-react-16';

src/app/__tests__/StateContainter.test.js renamed to src/app/__tests__/StateContainer.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/jsx-filename-extension */
12
import { mount, configure } from 'enzyme';
23
import React from 'react';
34
import { MemoryRouter, NavLink } from 'react-router-dom';

src/app/__tests__/TravelContainer.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/jsx-filename-extension */
12
import { shallow, configure } from 'enzyme';
23
import React from 'react';
34
import Adapter from 'enzyme-adapter-react-16';

src/app/__tests__/actionContainer.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable react/jsx-filename-extension */
2+
13
import { shallow, configure } from 'enzyme';
24
import React from 'react';
35
import Adapter from 'enzyme-adapter-react-16';

src/app/__tests__/dropdown.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/jsx-filename-extension */
12
import React from 'react';
23
import { configure, shallow } from 'enzyme';
34
import Adapter from 'enzyme-adapter-react-16';

src/app/components/Chart.jsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* eslint-disable no-underscore-dangle */
2+
/* eslint-disable no-param-reassign */
3+
/* eslint-disable no-use-before-define */
4+
/* eslint-disable react/no-string-refs */
15
import React, { Component } from 'react';
26
import PropTypes from 'prop-types';
37
import '../styles/components/_d3Tree.scss';
@@ -60,7 +64,7 @@ class Chart extends Component {
6064
.attr('class', 'tooltip')
6165
.style('opacity', 1e-6)
6266
.on('mouseover', tipMouseover)
63-
.on('mouseout', tipMouseout)
67+
.on('mouseout', tipMouseout);
6468

6569
root.x0 = height / 2;
6670
root.y0 = 0;
@@ -76,7 +80,10 @@ class Chart extends Component {
7680
// Update the nodes…
7781
const node = svg.selectAll('g.node')
7882
.data(nodes, (d) => {
79-
if (!d.id) d.id = ++i;
83+
if (!d.id) {
84+
i += 1;
85+
d.id = i;
86+
}
8087
return d.id;
8188
});
8289

@@ -175,7 +182,7 @@ class Chart extends Component {
175182
div.transition()
176183
.duration(300)
177184
.style('display', 'block')
178-
.style('opacity', 1)
185+
.style('opacity', 1);
179186
}
180187

181188
function mouseout() {
@@ -205,14 +212,6 @@ class Chart extends Component {
205212
.style('top', `${d3.event.pageY}px`);
206213
}
207214

208-
function collapse(d) {
209-
if (d.children) {
210-
d._children = d.children;
211-
d._children.forEach(collapse);
212-
d.children = null;
213-
}
214-
}
215-
216215
update(root);
217216
duration = 750;
218217

src/app/components/Tree.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const getItemString = (type, data) => {
1212
) {
1313
return <span>{data.name}</span>;
1414
}
15+
return null;
1516
};
1617

1718
const Tree = (props) => {

src/app/containers/MainContainer.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ function MainContainer() {
4141
}
4242
});
4343

44-
// console log if the port with background script disconnects
45-
port.onDisconnect.addListener((obj) => {
46-
console.log('disconnected port', obj);
44+
port.onDisconnect.addListener(() => {
45+
// disconnecting
4746
});
4847

4948
// assign port to state so it could be used by other components

src/app/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/jsx-filename-extension */
12
import React from 'react';
23
import ReactDOM from 'react-dom';
34
import App from './components/App';

src/extension/background.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ chrome.runtime.onMessage.addListener((request, sender) => {
9898
// don't add anything to snapshot storage if mode is persisting for the initial snapshot
9999
if (!persist) tabsObj[tabId].snapshots.push(request.payload);
100100
if (bg) {
101-
console.log('connecting');
102101
bg.postMessage({
103102
action: 'initialConnectSnapshots',
104103
payload: tabsObj,

0 commit comments

Comments
 (0)