-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.tsx
37 lines (29 loc) · 768 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { useEffect, useState } from 'react';
import { createRoot } from 'react-dom/client';
const App = () => {
const [foo, setFoo] = useState(0);
if (true) {
// react-hooks/rule-of-hooks
useState(1);
}
useEffect(() => {
foo;
// react-hooks/exhaustive-deps
}, []);
return (
// tailwindcss/classnames-order
<div className='gap-2 flex '>
{/* 'react/void-dom-elements-no-children' */}
<br>hello</br>
</div>
);
};
const root = document.getElementById('root') as HTMLDivElement;
createRoot(root).render(<App />);
// @typescript-eslint/await-thenable
await 'some promise';
// eqeqeq
if (Math.random() == 2) {
// unicorn/error-message
throw Error();
}