apply prettier styles

This commit is contained in:
restrry 2020-05-22 09:08:58 +02:00
parent 64ad4f3f92
commit bf04235dae
7130 changed files with 31393 additions and 37163 deletions

View file

@ -82,7 +82,7 @@ export const CountUntil: React.FC<Props> = ({ fetchStreaming }) => {
<EuiFieldNumber
placeholder="Some integer"
value={data}
onChange={e => setData(Number(e.target.value))}
onChange={(e) => setData(Number(e.target.value))}
/>
</EuiFormRow>
<EuiButton type="submit" fill onClick={handleSubmit}>

View file

@ -49,18 +49,18 @@ export const DoubleIntegers: React.FC<Props> = ({ double }) => {
setShowingResults(true);
const nums = numbers
.split('\n')
.map(num => num.trim())
.map((num) => num.trim())
.filter(Boolean)
.map(Number);
counter.set(nums.length);
nums.forEach(num => {
nums.forEach((num) => {
double({ num }).then(
result => {
(result) => {
if (!isMounted()) return;
counter.dec();
pushResult({ num, result });
},
error => {
(error) => {
if (!isMounted()) return;
counter.dec();
pushResult({ num, error });
@ -94,7 +94,7 @@ export const DoubleIntegers: React.FC<Props> = ({ double }) => {
fullWidth
placeholder="Enter numbers in milliseconds separated by new line"
value={numbers}
onChange={e => setNumbers(e.target.value)}
onChange={(e) => setNumbers(e.target.value)}
/>
</EuiFormRow>
<EuiButton type="submit" fill onClick={handleSubmit}>

View file

@ -30,7 +30,7 @@ export const App: React.FC = () => {
const routeElements: React.ReactElement[] = [];
for (const { items } of routes) {
for (const { id, component } of items) {
routeElements.push(<Route key={id} path={`/${id}`} render={props => component} />);
routeElements.push(<Route key={id} path={`/${id}`} render={(props) => component} />);
}
}

View file

@ -39,7 +39,7 @@ export const Sidebar: React.FC<SidebarProps> = () => {
id,
name: title,
isSelected: true,
items: items.map(route => ({
items: items.map((route) => ({
id: route.id,
name: route.title,
onClick: () => history.push(`/${route.id}`),

View file

@ -54,7 +54,7 @@ export class BfetchExplorerPlugin implements Plugin {
// Validate inputs.
if (num < 0) throw new Error('Invalid number');
// Wait number of specified milliseconds.
await new Promise(r => setTimeout(r, num));
await new Promise((r) => setTimeout(r, num));
// Double the number and send it back.
return { num: 2 * num };
},