Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 69e903a

Browse files
committed
Fix lint errors
1 parent 425d0ce commit 69e903a

File tree

9 files changed

+22
-20
lines changed

9 files changed

+22
-20
lines changed

‎examples/parent-child-demo/src/Main.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ export default class Main extends Component {
3333
state = {
3434
selectedSampleIx: sessionSelectedSampleIx ? +sessionSelectedSampleIx : 0,
3535
isShowingParent: true
36-
}
36+
};
3737

3838
onCheckboxChange = (evt) => {
3939
this.setState({
4040
isShowingParent: evt.currentTarget.checked
4141
});
42-
}
42+
};
4343

4444
onSelectSample = (evt) => {
4545
const selectedSampleIx = +evt.currentTarget.value;
4646
this.setState({selectedSampleIx});
4747
sessionStorage.setItem(sessionSelectedSampleIxKey, selectedSampleIx);
4848
clearLog();
49-
}
49+
};
5050

5151
render() {
5252
const selectedSample = sampleComponents[this.state.selectedSampleIx];

‎examples/parent-child-demo/src/samples/Legacy.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ export default class Parent extends Component {
1212
state = {
1313
showLastChild: true,
1414
x: 42
15-
}
15+
};
1616

1717
onCheckboxChange = (evt) => {
1818
this.setState({
1919
showLastChild: evt.currentTarget.checked
2020
});
21-
}
21+
};
2222

2323
incX = () => {
2424
this.props.trace('Custom message, calling incX');
2525
this.setState(({x}) => {
2626
return {x: x + 1};
2727
});
28-
}
28+
};
2929

3030
componentWillMount() {
3131
this.props.trace('Don\'t use componentWillMount!');
@@ -58,13 +58,13 @@ class Child extends Component {
5858
state = {
5959
y: 1,
6060
squaredX: this.props.x ** 2
61-
}
61+
};
6262

6363
incY = () => {
6464
this.setState((prevState) => {
6565
return {y: prevState.y + 1};
6666
});
67-
}
67+
};
6868

6969
componentWillReceiveProps(nextProps) {
7070
this.setState({squaredX: nextProps.x ** 2});

‎examples/parent-child-demo/src/samples/New.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ export default class Parent extends Component {
1111
state = {
1212
showLastChild: true,
1313
x: 42
14-
}
14+
};
1515

1616
onCheckboxChange = (evt) => {
1717
this.setState({
1818
showLastChild: evt.currentTarget.checked
1919
});
20-
}
20+
};
2121

2222
incX = () => {
2323
this.props.trace('Custom message, calling incX');
2424
this.setState(({x}) => {
2525
return {x: x + 1};
2626
});
27-
}
27+
};
2828

2929
render() {
3030
return (
@@ -52,13 +52,13 @@ export default class Parent extends Component {
5252
class Child extends Component {
5353
state = {
5454
y: 1
55-
}
55+
};
5656

5757
incY = () => {
5858
this.setState((prevState) => {
5959
return {y: prevState.y + 1};
6060
});
61-
}
61+
};
6262

6363
static getDerivedStateFromProps(nextProps, prevState) {
6464
nextProps.trace('nextProps: ' + JSON.stringify(nextProps));

‎src/components/Log.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Log extends Component {
2929
break;
3030
}
3131
}
32-
}
32+
};
3333

3434
componentDidMount() {
3535
document.addEventListener('keydown', this.onKeyDown);

‎src/components/LogEntries.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
33
export default class LogEntries extends Component {
44
highlight = (index) => {
55
this.props.highlight(index);
6-
}
6+
};
77

88
componentDidUpdate(prevProps) {
99
if (prevProps.entries.length !== this.props.entries.length) {

‎src/redux/reducer.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const initialState = {
1010
replayTimerDelay: sessionReplayTimerDelay ? +sessionReplayTimerDelay : constants.delayValues[1],
1111
};
1212

13+
// eslint-disable-next-line default-param-last
1314
export const reducer = (state = initialState, action) => {
1415
// console.log('reducing', action, state);
1516
switch (action.type) {

‎src/traceLifecycle.jsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export default function traceLifecycle(ComponentToTrace) {
165165

166166
const instanceId = mkInstanceId(ComponentToTrace.name);
167167

168+
// eslint-disable-next-line react/no-unstable-nested-components
168169
const WrappedLifecyclePanel = () => (
169170
<LifecyclePanel
170171
componentName={componentToTraceName}

‎test/TracedChild.jsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React, { Component } from 'react';
22
import { traceLifecycle } from '../src';
33

44
class Child extends Component {
5-
state = {}
5+
state = {};
66

7-
static staticProperty = 'a static property'
7+
static staticProperty = 'a static property';
88

99
constructor(props, context) {
1010
super(props, context);
@@ -56,7 +56,7 @@ class Child extends Component {
5656
}, () => {
5757
this.props.trace('custom:setState callback');
5858
});
59-
}
59+
};
6060
}
6161

6262
const TracedChild = traceLifecycle(Child);

‎test/TracedLegacyChild.jsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
33
import { traceLifecycle } from '../src';
44

55
class LegacyChild extends Component {
6-
state = {}
6+
state = {};
77

88
constructor(props, context) {
99
super(props, context);
@@ -56,7 +56,7 @@ class LegacyChild extends Component {
5656
}, () => {
5757
this.props.trace('custom:setState callback');
5858
});
59-
}
59+
};
6060
}
6161

6262
const TracedLegacyChild = traceLifecycle(LegacyChild);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /