run prettier

This commit is contained in:
Patrik Oldsberg
2020-09-05 16:07:04 +02:00
parent 7a7396be55
commit b045b166b6
42 changed files with 150 additions and 139 deletions
@@ -31,7 +31,7 @@ const columns: TableColumn[] = [
title: 'Website URL',
field: 'websiteUrl',
},
...CATEGORIES.map((category) => ({
...CATEGORIES.map(category => ({
title: CATEGORY_LABELS[category],
field: category,
})),
@@ -56,7 +56,7 @@ export const AuditListTable: FC<{ items: Website[] }> = ({ items }) => {
const lighthouseApi = useApi(lighthouseApiRef);
const runRefresh = (websites: Website[]) => {
websites.forEach(async (website) => {
websites.forEach(async website => {
const response = await lighthouseApi.getWebsiteForAuditId(
website.lastAudit.id,
);
@@ -64,7 +64,7 @@ export const AuditListTable: FC<{ items: Website[] }> = ({ items }) => {
if (auditStatus === 'COMPLETED' || auditStatus === 'FAILED') {
const newWebsiteData = websiteState.slice(0);
newWebsiteData[
newWebsiteData.findIndex((w) => w.url === response.url)
newWebsiteData.findIndex(w => w.url === response.url)
] = response;
setWebsiteState(newWebsiteData);
}
@@ -72,7 +72,7 @@ export const AuditListTable: FC<{ items: Website[] }> = ({ items }) => {
};
const runningWebsiteAudits = websiteState
? websiteState.filter((website) => website.lastAudit.status === 'RUNNING')
? websiteState.filter(website => website.lastAudit.status === 'RUNNING')
: [];
useInterval(
@@ -80,10 +80,10 @@ export const AuditListTable: FC<{ items: Website[] }> = ({ items }) => {
runningWebsiteAudits.length > 0 ? 5000 : null,
);
const data = websiteState.map((website) => {
const data = websiteState.map(website => {
const trendlineData = buildSparklinesDataForItem(website);
const trendlines: any = {};
CATEGORIES.forEach((category) => {
CATEGORIES.forEach(category => {
trendlines[category] = (
<TrendLine
title={`trendline for ${CATEGORY_LABELS[category]} category of ${website.url}`}
@@ -71,7 +71,7 @@ export default builder.build() as ApiHolder;
\`\`\`
`;
const useStyles = makeStyles((theme) => ({
const useStyles = makeStyles(theme => ({
tabs: { marginBottom: -18 },
tab: { minWidth: 72, paddingLeft: 1, paddingRight: 1 },
content: { marginBottom: theme.spacing(2) },