Skip to content

Commit 53a6c94

Browse files
authored
chore(lint): restore running prettier as part of linting (#3274)
1 parent e8bf3a0 commit 53a6c94

File tree

55 files changed

+353
-253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+353
-253
lines changed

.nycrc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
2-
"extension": [
3-
".ts"
4-
],
5-
"include": [
6-
"src/**"
7-
],
2+
"extension": [".ts"],
3+
"include": ["src/**"],
84
"reporter": ["text", "json"],
95
"exclude": [
106
"**/*.d.ts",
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"env": {
33
"test": {
4-
"presets": [
5-
["preact-cli/babel", { "modules": "commonjs" }]
6-
]
4+
"presets": [["preact-cli/babel", { "modules": "commonjs" }]]
75
}
86
}
97
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
4-
<meta charset=utf-8 />
4+
<meta charset="utf-8" />
55
<title>React Load Example: Preact</title>
66
</head>
77
<body>
8-
<div id="root"></div>
8+
<div id="root"></div>
99
</body>
1010
</html>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
4-
<meta charset=utf-8 />
4+
<meta charset="utf-8" />
55
<title>React Load Example</title>
66
<script type="text/jsx"></script>
77
</head>
88
<body>
9-
<div id="root"></div>
9+
<div id="root"></div>
1010
</body>
1111
</html>
Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,55 @@
11
import React from 'react';
2-
import { Button} from 'reactstrap';
3-
import { BaseOpenTelemetryComponent } from '@opentelemetry/plugin-react-load'
2+
import { Button } from 'reactstrap';
3+
import { BaseOpenTelemetryComponent } from '@opentelemetry/plugin-react-load';
44

55
class Content extends BaseOpenTelemetryComponent {
6-
constructor(props){
7-
super(props)
6+
constructor(props) {
7+
super(props);
88
this.state = {
99
results: null,
10-
isLoading: false
11-
}
10+
isLoading: false,
11+
};
1212
}
1313

14-
componentDidMount(){
14+
componentDidMount() {
1515
// Example, do something here
1616
}
1717

1818
buttonHandler() {
19-
this.setState({isLoading: true})
20-
const randomDelay = Math.random() * 10000;
19+
this.setState({ isLoading: true });
20+
const randomDelay = Math.random() * 10000;
2121
setTimeout(() => {
2222
this.setState({
2323
isLoading: false,
24-
results: randomDelay
25-
})
26-
},
27-
randomDelay);
24+
results: randomDelay,
25+
});
26+
}, randomDelay);
2827
}
2928

30-
renderResults(){
31-
if(this.state.isLoading){
29+
renderResults() {
30+
if (this.state.isLoading) {
3231
return <div> Loading results...</div>;
33-
}
34-
if (!this.state.results){
35-
return (
36-
<div>No Results</div>
37-
)
3832
}
39-
return (
40-
<div>
41-
Request was delayed {this.state.results} ms
42-
</div>
43-
)
33+
if (!this.state.results) {
34+
return <div>No Results</div>;
35+
}
36+
return <div>Request was delayed {this.state.results} ms</div>;
4437
}
4538

4639
render() {
4740
return (
4841
<div>
4942
<h1>React Plugin Demo App</h1>
50-
<Button onClick={() => this.buttonHandler()} style={{marginBottom: '20px'}}>
43+
<Button
44+
onClick={() => this.buttonHandler()}
45+
style={{ marginBottom: '20px' }}
46+
>
5147
Make Request
5248
</Button>
53-
<div id="results">
54-
{this.renderResults()}
55-
</div>
49+
<div id="results">{this.renderResults()}</div>
5650
</div>
57-
)
51+
);
5852
}
5953
}
60-
54+
6155
export default Content;

examples/react-load/react/src/Home.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ class Home extends BaseOpenTelemetryComponent {
66
render() {
77
return (
88
<div>
9-
<h1>
10-
React Plugin Demo App
11-
</h1>
12-
<Link to='/test'><button>Enter</button></Link>
9+
<h1>React Plugin Demo App</h1>
10+
<Link to="/test">
11+
<button>Enter</button>
12+
</Link>
1313
</div>
14-
)
14+
);
1515
}
1616
}
1717

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import {BrowserRouter as Router, Route } from 'react-router-dom';
3+
import { BrowserRouter as Router, Route } from 'react-router-dom';
44
import Home from './Home';
55
import Content from './Content';
66
import Tracer from './web-tracer.js';
77

8-
Tracer('example-react-load')
8+
Tracer('example-react-load');
99

1010
ReactDOM.render(
11-
<Router>
12-
<main>
13-
<Route exact path='/' component={Home}/>
14-
<Route exact path='/test' component={Content}/>
15-
</main>
16-
</Router>
17-
,document.getElementById('root'));
11+
<Router>
12+
<main>
13+
<Route exact path="/" component={Home} />
14+
<Route exact path="/test" component={Content} />
15+
</main>
16+
</Router>,
17+
document.getElementById('root')
18+
);
Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Document Load Plugin Example</title>
6+
<base href="/" />
37

4-
<head>
5-
<meta charset="utf-8">
6-
<title>Document Load Plugin Example</title>
7-
<base href="/">
8-
9-
<!--
8+
<!--
109
https://www.w3.org/TR/trace-context/
1110
Set the `traceparent` in the server's HTML template code. It should be
1211
dynamically generated server side to have the server's request trace Id,
@@ -15,17 +14,16 @@
1514
(01 = sampled, 00 = notsampled).
1615
'{version}-{traceId}-{spanId}-{sampleDecision}'
1716
-->
18-
<!-- <meta name="traceparent" content="00-ab42124a3c573678d4d8b21ba52df3bf-d21f7bc17caa5aba-01">-->
19-
20-
<meta name="viewport" content="width=device-width, initial-scale=1">
21-
</head>
22-
23-
<body>
24-
Example of using Web Tracer with document load plugin with console exporter and collector exporter
25-
<script type="text/javascript" src="document-load.js"></script>
26-
<br/>
27-
<button id="button1">Test WebTracer with ZoneContextManager - async</button>
17+
<!-- <meta name="traceparent" content="00-ab42124a3c573678d4d8b21ba52df3bf-d21f7bc17caa5aba-01">-->
2818

29-
</body>
19+
<meta name="viewport" content="width=device-width, initial-scale=1" />
20+
</head>
3021

22+
<body>
23+
Example of using Web Tracer with document load plugin with console exporter
24+
and collector exporter
25+
<script type="text/javascript" src="document-load.js"></script>
26+
<br />
27+
<button id="button1">Test WebTracer with ZoneContextManager - async</button>
28+
</body>
3129
</html>
Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>User Interaction Example</title>
6+
<base href="/" />
37

4-
<head>
5-
<meta charset="utf-8">
6-
<title>User Interaction Example</title>
7-
<base href="/">
8-
9-
<!--
8+
<!--
109
https://www.w3.org/TR/trace-context/
1110
Set the `traceparent` in the server's HTML template code. It should be
1211
dynamically generated server side to have the server's request trace Id,
@@ -15,25 +14,24 @@
1514
(01 = sampled, 00 = notsampled).
1615
'{version}-{traceId}-{spanId}-{sampleDecision}'
1716
-->
18-
<!-- <meta name="traceparent" content="00-ab42124a3c573678d4d8b21ba52df3bf-d21f7bc17caa5aba-01">-->
19-
20-
<meta name="viewport" content="width=device-width, initial-scale=1">
21-
</head>
22-
23-
<body>
24-
Example of using Web Tracer with meta package and with console exporter and collector exporter
25-
<script type="text/javascript" src="meta.js"></script>
26-
<br/>
27-
<button id="btnAdd" class="btnAddClass">Add button</button>
28-
<div>
29-
<div></div>
30-
<div></div>
31-
<div></div>
32-
<div id="buttons"></div>
33-
<div></div>
34-
</div>
35-
<br/>
17+
<!-- <meta name="traceparent" content="00-ab42124a3c573678d4d8b21ba52df3bf-d21f7bc17caa5aba-01">-->
3618

37-
</body>
19+
<meta name="viewport" content="width=device-width, initial-scale=1" />
20+
</head>
3821

22+
<body>
23+
Example of using Web Tracer with meta package and with console exporter and
24+
collector exporter
25+
<script type="text/javascript" src="meta.js"></script>
26+
<br />
27+
<button id="btnAdd" class="btnAddClass">Add button</button>
28+
<div>
29+
<div></div>
30+
<div></div>
31+
<div></div>
32+
<div id="buttons"></div>
33+
<div></div>
34+
</div>
35+
<br />
36+
</body>
3937
</html>
Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>User Interaction Example</title>
6+
<base href="/" />
37

4-
<head>
5-
<meta charset="utf-8">
6-
<title>User Interaction Example</title>
7-
<base href="/">
8-
9-
<!--
8+
<!--
109
https://www.w3.org/TR/trace-context/
1110
Set the `traceparent` in the server's HTML template code. It should be
1211
dynamically generated server side to have the server's request trace Id,
@@ -15,25 +14,24 @@
1514
(01 = sampled, 00 = notsampled).
1615
'{version}-{traceId}-{spanId}-{sampleDecision}'
1716
-->
18-
<!-- <meta name="traceparent" content="00-ab42124a3c573678d4d8b21ba52df3bf-d21f7bc17caa5aba-01">-->
19-
20-
<meta name="viewport" content="width=device-width, initial-scale=1">
21-
</head>
22-
23-
<body>
24-
Example of using Web Tracer with UserInteractionInstrumentation and XMLHttpRequestInstrumentation with console exporter and collector exporter
25-
<script type="text/javascript" src="user-interaction.js"></script>
26-
<br/>
27-
<button id="btnAdd" class="btnAddClass">Add button</button>
28-
<div>
29-
<div></div>
30-
<div></div>
31-
<div></div>
32-
<div id="buttons"></div>
33-
<div></div>
34-
</div>
35-
<br/>
17+
<!-- <meta name="traceparent" content="00-ab42124a3c573678d4d8b21ba52df3bf-d21f7bc17caa5aba-01">-->
3618

37-
</body>
19+
<meta name="viewport" content="width=device-width, initial-scale=1" />
20+
</head>
3821

22+
<body>
23+
Example of using Web Tracer with UserInteractionInstrumentation and
24+
XMLHttpRequestInstrumentation with console exporter and collector exporter
25+
<script type="text/javascript" src="user-interaction.js"></script>
26+
<br />
27+
<button id="btnAdd" class="btnAddClass">Add button</button>
28+
<div>
29+
<div></div>
30+
<div></div>
31+
<div></div>
32+
<div id="buttons"></div>
33+
<div></div>
34+
</div>
35+
<br />
36+
</body>
3937
</html>

0 commit comments

Comments
 (0)