-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
41 lines (31 loc) · 780 Bytes
/
index.js
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
38
39
40
41
import fs from 'fs';
import { useState } from 'react';
const num = 1;
let a = 'str';
console.log(fs, a.substr(0));
function b(num) {
if (true) {
console.log(num);
}
}
b();
c();
const d = { e: { f: 1 } };
console.log(d?.e?.f);
export function Component() {
const [user, updateUser] = useState(null);
console.log(user, updateUser);
// New JSX transform: JSX does not throw an error when React not in scope
// https://github.com/yannickcr/eslint-plugin-react/issues/2440#issuecomment-683433266
return (
<div class="abc">
<div key="xx">1</div>
<iframe key="xx" title="a" />
</div>
);
}
Component();
const OtherComponent = (x, y) => {};
const PascalCaseVar = 1;
const snake_case_var = 1;
OtherComponent(PascalCaseVar, snake_case_var);