chore(web): ♻️ npx prettier . --write

This commit is contained in:
Collin Barrett 2024-06-14 13:40:19 -05:00
parent 4ccbfca3ea
commit 2fefd15bb3
18 changed files with 42 additions and 42 deletions

View file

@ -26,5 +26,5 @@ module.exports = override(
adjustStyleLoaders(({ use: [, , postcss] }) => {
const postcssOptions = postcss.options;
postcss.options = { postcssOptions };
})
}),
);

View file

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

View file

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>FilterLists.com for Internet Explorer</title>

View file

@ -55,7 +55,7 @@ const SubscribeButton = (props: SubscribeButtonProps) => {
const buttonProps = buildButtonProps(
props.name,
props.viewUrl,
props.isPrimary
props.isPrimary,
);
return (
<Button
@ -74,7 +74,7 @@ const SubscribeButton = (props: SubscribeButtonProps) => {
const buildButtonProps = (
name: string,
viewUrl: string,
isPrimary: boolean
isPrimary: boolean,
) => {
let type: ButtonType = isPrimary ? "primary" : "default";
let hidden: boolean = false;

View file

@ -46,18 +46,18 @@ export const ListInfoDrawer = (props: RouteComponentProps & Props) => {
const list = useListDetails(props.listId);
const listLanguage = props.languages.filter((l) =>
list?.languageIds.includes(l.id)
list?.languageIds.includes(l.id),
);
const listTags = props.tags.filter((t) => list?.tagIds.includes(t.id));
const listLicense = props.licenses.find((l) => l.id === list?.licenseId);
const listSyntaxes = props.syntaxes.filter((s) =>
list?.syntaxIds.includes(s.id)
list?.syntaxIds.includes(s.id),
);
const listSoftware = props.software.filter((s) =>
s.syntaxIds.some((sid) => list?.syntaxIds.includes(sid))
s.syntaxIds.some((sid) => list?.syntaxIds.includes(sid)),
);
const listMaintainers = props.maintainers.filter((m) =>
list?.maintainerIds.includes(m.id)
list?.maintainerIds.includes(m.id),
);
const [originalTitle] = useState<string>(document.title);

View file

@ -51,7 +51,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
const tablePageSize = useTablePageSizer();
const searchNameColumn = useSearchColumnFilter<List>(nameof<List>("name"));
const searchDescriptionColumn = useSearchColumnFilter<List>(
nameof<List>("description")
nameof<List>("description"),
);
const [visibleLists, setVisibleLists] = useState<List[]>(lists);
useEffect(() => {
@ -78,7 +78,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
_pagination: TablePaginationConfig,
_filters: Record<string, (Key | boolean)[] | null>,
_sorter: SorterResult<List> | SorterResult<List>[],
extra: TableCurrentDataSource<List>
extra: TableCurrentDataSource<List>,
) => setVisibleLists(extra.currentDataSource)}
>
<Table.Column<List>
@ -140,7 +140,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
.filter(
(s: Software) =>
s.syntaxIds &&
s.syntaxIds.some((i) => l.syntaxIds.includes(i))
s.syntaxIds.some((i) => l.syntaxIds.includes(i)),
)
.map((s) => s.id);
return arraySorter(getSoftwareIds(a), getSoftwareIds(b), software);
@ -156,7 +156,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
visibleLists.filter(
(l) =>
s.syntaxIds &&
s.syntaxIds.some((i) => l.syntaxIds.includes(i))
s.syntaxIds.some((i) => l.syntaxIds.includes(i)),
).length
}
)
@ -176,7 +176,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
software={software.filter(
(s: Software) =>
s.syntaxIds &&
s.syntaxIds.some((i) => syntaxIds.includes(i))
s.syntaxIds.some((i) => syntaxIds.includes(i)),
)}
/>
) : null
@ -197,7 +197,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
&nbsp;(
{
visibleLists.filter(
(li) => li.syntaxIds && li.syntaxIds.includes(s.id)
(li) => li.syntaxIds && li.syntaxIds.includes(s.id),
).length
}
)
@ -214,7 +214,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
syntaxIds ? (
<SyntaxCloud
syntaxes={syntaxes.filter((s: Syntax) =>
syntaxIds.includes(s.id)
syntaxIds.includes(s.id),
)}
/>
) : null
@ -237,7 +237,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
{l.name}&nbsp; (
{
visibleLists.filter(
(li) => li.languageIds && li.languageIds.includes(l.id)
(li) => li.languageIds && li.languageIds.includes(l.id),
).length
}
)
@ -254,7 +254,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
languageIds ? (
<LanguageCloud
languages={languages.filter((l: Language) =>
languageIds.includes(l.id)
languageIds.includes(l.id),
)}
/>
) : null
@ -274,7 +274,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
<Tag title={t.description}>{t.name}</Tag>(
{
visibleLists.filter(
(l) => l.tagIds && l.tagIds.includes(t.id)
(l) => l.tagIds && l.tagIds.includes(t.id),
).length
}
)
@ -309,7 +309,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
<Tag title={t.name}>{t.name}</Tag>(
{
visibleLists.filter(
(l) => l.maintainerIds && l.maintainerIds.includes(t.id)
(l) => l.maintainerIds && l.maintainerIds.includes(t.id),
).length
}
)
@ -324,7 +324,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
maintainerIds ? (
<MaintainerCloud
maintainers={maintainers.filter((t: Maintainer) =>
maintainerIds.includes(t.id)
maintainerIds.includes(t.id),
)}
/>
) : null
@ -352,7 +352,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
<LicenseTag name={l.name} showLabel={false} />(
{
visibleLists.filter(
(li) => li.licenseId && li.licenseId === l.id
(li) => li.licenseId && li.licenseId === l.id,
).length
}
)

View file

@ -6,7 +6,7 @@ interface ArraySortableEntity {
export const arraySorter = (
a: number[],
b: number[],
entities: ArraySortableEntity[]
entities: ArraySortableEntity[],
) =>
a && a.length
? b && b.length
@ -24,7 +24,7 @@ export const arraySorter = (
? 1
: -1
: a.length > b.length
? -1
: 1
? -1
: 1
: -1
: 1;

View file

@ -22,7 +22,7 @@ export const MaintainerCloud = (props: Props) =>
</Tag>
) : (
<Tag key={i}>{m.name}</Tag>
)
),
)}
</div>
) : null;

View file

@ -32,7 +32,7 @@ const MaintainerComponent = (props: MaintainerComponentProps) => {
rel="noopener noreferrer"
>
<HomeOutlined key="home" />
</a>
</a>,
);
}
if (props.maintainer.emailAddress) {
@ -44,7 +44,7 @@ const MaintainerComponent = (props: MaintainerComponentProps) => {
rel="noopener noreferrer"
>
<MailOutlined key="mail" />
</a>
</a>,
);
}
if (props.maintainer.twitterHandle) {
@ -56,7 +56,7 @@ const MaintainerComponent = (props: MaintainerComponentProps) => {
rel="noopener noreferrer"
>
<TwitterOutlined key="twitter" />
</a>
</a>,
);
}
return <Card title={props.maintainer.name} actions={actions} />;

View file

@ -26,7 +26,7 @@ export const SoftwareCloud = (props: Props) =>
</a>
) : (
<SoftwareIcon key={i} id={s.id} />
)
),
)}
</div>
) : null;

View file

@ -3,5 +3,5 @@ import { useApiData } from "./useApiData";
export const useLanguages = () =>
(useApiData<Language[]>("https://api.filterlists.com/languages") || []).sort(
(a: Language, b: Language) => a.name.localeCompare(b.name)
(a: Language, b: Language) => a.name.localeCompare(b.name),
);

View file

@ -3,5 +3,5 @@ import { useApiData } from "./useApiData";
export const useLicenses = () =>
(useApiData<License[]>("https://api.filterlists.com/licenses") || []).sort(
(a: License, b: License) => a.name.localeCompare(b.name)
(a: License, b: License) => a.name.localeCompare(b.name),
);

View file

@ -3,5 +3,5 @@ import { useApiData } from "./useApiData";
export const useSoftware = () =>
(useApiData<Software[]>("https://api.filterlists.com/software") || []).sort(
(a: Software, b: Software) => a.name.localeCompare(b.name)
(a: Software, b: Software) => a.name.localeCompare(b.name),
);

View file

@ -3,5 +3,5 @@ import { useApiData } from "./useApiData";
export const useSyntaxes = () =>
(useApiData<Syntax[]>("https://api.filterlists.com/syntaxes") || []).sort(
(a: Syntax, b: Syntax) => a.name.localeCompare(b.name)
(a: Syntax, b: Syntax) => a.name.localeCompare(b.name),
);

View file

@ -3,5 +3,5 @@ import { useApiData } from "./useApiData";
export const useTags = () =>
(useApiData<Tag[]>("https://api.filterlists.com/tags") || []).sort(
(a: Tag, b: Tag) => a.name.localeCompare(b.name)
(a: Tag, b: Tag) => a.name.localeCompare(b.name),
);

View file

@ -8,7 +8,7 @@ ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
document.getElementById("root"),
);
// If you want to start measuring performance in your app, pass a function

View file

@ -6,6 +6,6 @@ module.exports = function (app) {
createProxyMiddleware({
target: "http://localhost:8080",
changeOrigin: true,
})
}),
);
};

View file

@ -1,6 +1,6 @@
{
"navigationFallback": {
"rewrite": "/index.html"
},
"trailingSlash": "never"
}
"navigationFallback": {
"rewrite": "/index.html"
},
"trailingSlash": "never"
}