Skip to content

Commit 4609b8f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ac4ac74 commit 4609b8f

4 files changed

Lines changed: 71 additions & 59 deletions

File tree

plugins/repo-data-omit-list.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
{
22
"description": "Configuration for Repository Explorer exclusions and tag normalization.",
33
"omitRepos": ["voqal/voqal", "Jailsonfs/community"],
4-
"implicitTags": ["talonvoice", "talon", "voice", "voice-recognition", "speech-recognition", "voice-commands", "voice-control"],
4+
"implicitTags": [
5+
"talonvoice",
6+
"talon",
7+
"voice",
8+
"voice-recognition",
9+
"speech-recognition",
10+
"voice-commands",
11+
"voice-control"
12+
],
513
"tagAliases": {
614
"a11y": "accessibility",
715
"macos-accessibility": "accessibility",

plugins/repo-data-plugin.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ module.exports = function (context, options) {
2323
if (omitConfig.omitRepos && Array.isArray(omitConfig.omitRepos)) {
2424
omitRepos = omitConfig.omitRepos;
2525
}
26-
if (omitConfig.implicitTags && Array.isArray(omitConfig.implicitTags)) {
26+
if (
27+
omitConfig.implicitTags &&
28+
Array.isArray(omitConfig.implicitTags)
29+
) {
2730
implicitTags = omitConfig.implicitTags;
2831
}
29-
if (omitConfig.tagAliases && typeof omitConfig.tagAliases === "object") {
32+
if (
33+
omitConfig.tagAliases &&
34+
typeof omitConfig.tagAliases === "object"
35+
) {
3036
tagAliases = omitConfig.tagAliases;
3137
}
3238
}

src/components/RepoExplorer/index.tsx

Lines changed: 51 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ const RepoExplorer: React.FC = () => {
3939
const [sortBy, setSortBy] = useState<"stars" | "updated" | "name">("stars");
4040
const [viewMode, setViewMode] = useState<"compact" | "expanded">("compact");
4141
const [showAllTags, setShowAllTags] = useState(false);
42-
const [implicitTags, setOmitTags] = useState<string[]>(["talonvoice", "talon"]);
42+
const [implicitTags, setOmitTags] = useState<string[]>([
43+
"talonvoice",
44+
"talon",
45+
]);
4346
const [tagAliases, setTagAliases] = useState<Record<string, string>>({});
4447
const [generatedAt, setGeneratedAt] = useState<string | null>(null);
4548

@@ -123,7 +126,14 @@ const RepoExplorer: React.FC = () => {
123126
});
124127

125128
return filtered;
126-
}, [repos, searchTerm, selectedLanguage, selectedTags, sortBy, canonicalToOriginals]);
129+
}, [
130+
repos,
131+
searchTerm,
132+
selectedLanguage,
133+
selectedTags,
134+
sortBy,
135+
canonicalToOriginals,
136+
]);
127137

128138
const languages = React.useMemo(() => {
129139
return Array.from(
@@ -333,9 +343,7 @@ const RepoExplorer: React.FC = () => {
333343
{searchTerm && ` matching "${searchTerm}"`}
334344
{selectedLanguage !== "all" && ` in ${selectedLanguage}`}
335345
{selectedTags.length > 0 && ` with tags: ${selectedTags.join(", ")}`}
336-
{generatedAt && (
337-
<> · Data updated {formatDate(generatedAt)}</>
338-
)}
346+
{generatedAt && <> · Data updated {formatDate(generatedAt)}</>}
339347
</p>
340348
</div>{" "}
341349
<div
@@ -407,34 +415,30 @@ const RepoExplorer: React.FC = () => {
407415
Updated {formatDate(repo.updated_at)}
408416
</span>
409417
</div>{" "}
410-
{repo.topics.filter(
411-
(topic) => !implicitTags.includes(topic),
412-
).length > 0 && (
418+
{repo.topics.filter((topic) => !implicitTags.includes(topic))
419+
.length > 0 && (
413420
<div className={styles.topics}>
414421
{repo.topics
415-
.filter(
416-
(topic) =>
417-
!implicitTags.includes(topic),
418-
)
422+
.filter((topic) => !implicitTags.includes(topic))
419423
.slice(0, 4)
420424
.map((topic) => {
421425
const canonical = resolveTag(topic);
422426
return (
423-
<button
424-
key={topic}
425-
className={clsx(
426-
styles.topic,
427-
styles.tagGeneric,
428-
selectedTags.includes(canonical) &&
429-
styles.tagGenericActive,
430-
selectedTags.includes(canonical) &&
431-
styles.topicActive,
432-
)}
433-
onClick={() => toggleTag(canonical)}
434-
title={`Filter by ${canonical}`}
435-
>
436-
{topic}
437-
</button>
427+
<button
428+
key={topic}
429+
className={clsx(
430+
styles.topic,
431+
styles.tagGeneric,
432+
selectedTags.includes(canonical) &&
433+
styles.tagGenericActive,
434+
selectedTags.includes(canonical) &&
435+
styles.topicActive,
436+
)}
437+
onClick={() => toggleTag(canonical)}
438+
title={`Filter by ${canonical}`}
439+
>
440+
{topic}
441+
</button>
438442
);
439443
})}
440444
{repo.topics.filter(
@@ -443,8 +447,7 @@ const RepoExplorer: React.FC = () => {
443447
<span className={styles.topicMore}>
444448
+
445449
{repo.topics.filter(
446-
(topic) =>
447-
!implicitTags.includes(topic),
450+
(topic) => !implicitTags.includes(topic),
448451
).length - 4}{" "}
449452
more
450453
</span>
@@ -507,34 +510,30 @@ const RepoExplorer: React.FC = () => {
507510
<span className={styles.updatedCompact}>
508511
{formatDate(repo.updated_at)}
509512
</span>{" "}
510-
{repo.topics.filter(
511-
(topic) => !implicitTags.includes(topic),
512-
).length > 0 && (
513+
{repo.topics.filter((topic) => !implicitTags.includes(topic))
514+
.length > 0 && (
513515
<div className={styles.topicsCompact}>
514516
{repo.topics
515-
.filter(
516-
(topic) =>
517-
!implicitTags.includes(topic),
518-
)
517+
.filter((topic) => !implicitTags.includes(topic))
519518
.slice(0, 2)
520519
.map((topic) => {
521520
const canonical = resolveTag(topic);
522521
return (
523-
<button
524-
key={topic}
525-
className={clsx(
526-
styles.topicCompact,
527-
styles.tagGeneric,
528-
selectedTags.includes(canonical) &&
529-
styles.tagGenericActive,
530-
selectedTags.includes(canonical) &&
531-
styles.topicActiveCompact,
532-
)}
533-
onClick={() => toggleTag(canonical)}
534-
title={`Filter by ${canonical}`}
535-
>
536-
{topic}
537-
</button>
522+
<button
523+
key={topic}
524+
className={clsx(
525+
styles.topicCompact,
526+
styles.tagGeneric,
527+
selectedTags.includes(canonical) &&
528+
styles.tagGenericActive,
529+
selectedTags.includes(canonical) &&
530+
styles.topicActiveCompact,
531+
)}
532+
onClick={() => toggleTag(canonical)}
533+
title={`Filter by ${canonical}`}
534+
>
535+
{topic}
536+
</button>
538537
);
539538
})}
540539
{repo.topics.filter(
@@ -543,8 +542,7 @@ const RepoExplorer: React.FC = () => {
543542
<span className={styles.topicMoreCompact}>
544543
+
545544
{repo.topics.filter(
546-
(topic) =>
547-
!implicitTags.includes(topic),
545+
(topic) => !implicitTags.includes(topic),
548546
).length - 2}
549547
</span>
550548
)}

src/pages/explorer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export default function Explorer(): JSX.Element {
4343
</p>
4444
<p className={styles.warning}>
4545
⚠️ <strong>Use at your own risk:</strong> These repositories may
46-
not be curated or tested. Do not download or run anything
47-
from unvetted repositories without careful review.{" "}
48-
For curated packages, visit{" "}
46+
not be curated or tested. Do not download or run anything from
47+
unvetted repositories without careful review. For curated
48+
packages, visit{" "}
4949
<a href="/integrations/talon_user_file_sets">
5050
talon_user_file_sets
5151
</a>

0 commit comments

Comments
 (0)