Skip to content

Commit e3c55f9

Browse files
committed
test: add jsx linting
1 parent 108b868 commit e3c55f9

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44

55
examples/**/*.js
66
examples/**/*.?js
7+
*.jsx
8+
!examples/component-tests/src/components/*.jsx
9+
710
**/package-lock.json
811
**/pnpm-lock.yaml
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
import { useState } from "react";
1+
import { useState } from 'react'
22

3-
export default function Stepper({ count: _count = 0, onChange = () => {} }) {
4-
const [count, setCount] = useState(_count);
3+
export default function Stepper({
4+
count: _count = 0,
5+
onChange = () => {}
6+
}) {
7+
const [count, setCount] = useState(_count)
58

69
const handleIncrement = () => {
7-
const newCount = count + 1;
8-
setCount(newCount);
9-
onChange(newCount);
10-
};
10+
const newCount = count + 1
11+
setCount(newCount)
12+
onChange(newCount)
13+
}
1114

1215
const handleDecrement = () => {
13-
const newCount = count - 1;
14-
setCount(newCount);
15-
onChange(newCount);
16-
};
16+
const newCount = count - 1
17+
setCount(newCount)
18+
onChange(newCount)
19+
}
1720

1821
return (
1922
<div>
@@ -25,5 +28,5 @@ export default function Stepper({ count: _count = 0, onChange = () => {} }) {
2528
+
2629
</button>
2730
</div>
28-
);
31+
)
2932
}

0 commit comments

Comments
 (0)