forked from trucknet-io/eslint-config-trucknet-io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
63 lines (48 loc) · 751 Bytes
/
test.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// @flow
import React from 'react';
import { testImport, helloworld } from 'hello';
console.log(helloworld, testImport);
console.error('error log');
const a = 123;
console.log(a);
const b = {
a: 1,
b: 2,
};
console.log(b);
function testFn (a, b) {
console.log(b);
if (a) {
return 123;
} else {
return 456;
}
// return 789;
}
testFn(1);
try {
console.log(123);
} catch (_error) {
console.log('error');
}
const obj = { a: 123 };
console.log(obj);
const arr = [
1,
2,
3,
];
console.log(arr);
const Component = ({ a, b }) => (
<h1 a="arr">
<span
style={{ border: 1 }}>
{a + b}
</span>
</h1>
);
const t = 'sa';
console.log(t);
console.log(Component);
const p = [1, 2];
console.log(p);