Skip to content

Commit 27fc54b

Browse files
committed
Lint harder
1 parent 1024637 commit 27fc54b

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "./node_modules/react-component-template/.eslintrc"
2+
"extends": "./node_modules/react-component-template/.eslintrc",
3+
"rules": {
4+
"react/jsx-sort-props": 0
5+
}
36
}

src/example/App/UndoRedo.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,21 @@ const UndoRedo = React.createClass({
3535
},
3636

3737

38-
redo() {
38+
onRedo() {
3939
this.setValueFromHistory(this.state.historyIndex + 1);
4040
},
4141

4242

43-
undo() {
43+
onUndo() {
4444
this.setValueFromHistory(this.state.historyIndex - 1);
4545
},
4646

4747

4848
render() {
49-
const history = this.state.history.map((value, key) => (
49+
const history = this.state.history.map((value, key) =>
5050
<span className={css.item} key={key}>
5151
{key === this.state.historyIndex ? <b>"{value}"</b> : <span>"{value}"</span>}
52-
</span>
53-
));
52+
</span>);
5453

5554

5655
return (
@@ -67,11 +66,11 @@ const UndoRedo = React.createClass({
6766
</label>
6867

6968
<label className={css.label}>
70-
<button className={css.input} onClick={this.undo}>Undo</button>
69+
<button className={css.input} onClick={this.onUndo}>Undo</button>
7170
</label>
7271

7372
<label className={css.label}>
74-
<button className={css.input} onClick={this.redo}>Redo</button>
73+
<button className={css.input} onClick={this.onRedo}>Redo</button>
7574
</label>
7675
</div>
7776

src/example/App/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Textarea from './Textarea';
66
import css from './App.css';
77

88

9-
const App = () => (
9+
const App = () =>
1010
<div className={css.app}>
1111
<h1>react-debounce-input</h1>
1212
<section className={css.section}>
@@ -28,8 +28,7 @@ const App = () => (
2828
<h2>Example 4. Debounced Textarea</h2>
2929
<Textarea />
3030
</section>
31-
</div>
32-
);
31+
</div>;
3332

3433

3534
export default App;

0 commit comments

Comments
 (0)