Skip to content

Commit 7af6073

Browse files
committed
bump dependencies, add few lint rules, address warnings
1 parent d95c521 commit 7af6073

11 files changed

Lines changed: 82 additions & 63 deletions

File tree

.oxlintrc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"promise/always-return": "error",
109109
"promise/no-callback-in-promise": "error",
110110
"react-hooks/rules-of-hooks": "error",
111+
"react/button-has-type": "error",
111112
"react/forward-ref-uses-ref": "error",
112113
"react/jsx-boolean-value": ["error"],
113114
"react/jsx-curly-brace-presence": ["error"],
@@ -125,18 +126,20 @@
125126
"react/no-did-mount-set-state": "error",
126127
"react/no-direct-mutation-state": "error",
127128
"react/no-redundant-should-component-update": "error",
129+
"react/no-string-refs": "error",
128130
"react/no-this-in-sfc": "error",
129131
"react/no-unknown-property": "error",
130132
"react/no-unescaped-entities": "error",
131133
"react/no-will-update-set-state": "error",
132134
"react/self-closing-comp": "error",
135+
"react/style-prop-object": "error",
133136
"typescript/await-thenable": "error",
134137
"typescript/ban-ts-comment": [
135138
"error",
136139
{
137140
"minimumDescriptionLength": 3,
138-
"ts-check": false,
139141
"ts-expect-error": "allow-with-description",
142+
"ts-check": false,
140143
"ts-ignore": true,
141144
"ts-nocheck": true
142145
}
@@ -148,6 +151,12 @@
148151
}
149152
],
150153
"typescript/no-confusing-non-null-assertion": "error",
154+
"typescript/no-confusing-void-expression": [
155+
"error",
156+
{
157+
"ignoreArrowShorthand": true
158+
}
159+
],
151160
"typescript/no-extra-non-null-assertion": "error",
152161
"typescript/no-misused-promises": [
153162
"error",

bun.lock

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/Library/Thumbnail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function Thumbnail({ url }: Props) {
2323
const maxImgPreviewHeight = maxPreviewHeight - 20;
2424

2525
return (
26-
<HoverCard.Root openDelay={0} closeDelay={0} onOpenChange={open => setShowPreview(open)}>
26+
<HoverCard.Root openDelay={0} closeDelay={0} onOpenChange={setShowPreview}>
2727
<HoverCard.Trigger asChild>
2828
<View
2929
tabIndex={0}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"@visx/xychart": "^3.12.0",
3535
"crypto-js": "^4.2.0",
3636
"es-toolkit": "^1.44.0",
37-
"expo": "55.0.0-preview.10",
38-
"expo-font": "^55.0.3",
37+
"expo": "55.0.0-preview.11",
38+
"expo-font": "^55.0.4",
3939
"next": "^16.1.6",
4040
"node-emoji": "^2.2.0",
4141
"postcss": "^8.5.6",
@@ -75,7 +75,7 @@
7575
"next-images": "^1.8.5",
7676
"oxfmt": "^0.33.0",
7777
"oxlint": "^1.48.0",
78-
"oxlint-tsgolint": "^0.13.0",
78+
"oxlint-tsgolint": "^0.14.1",
7979
"simple-git-hooks": "^2.13.1",
8080
"typescript": "^5.9.3",
8181
"user-agent-data-types": "^0.4.2"

pages/api/libraries/check.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
1818

1919
if (!packages || !Array.isArray(packages)) {
2020
res.statusCode = 500;
21-
return res.json({ error: 'packages must be an array' });
21+
res.json({ error: 'packages must be an array' });
22+
return;
2223
}
2324

2425
res.statusCode = 200;
@@ -28,5 +29,5 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
2829
result[pkgName] = DATASET[pkgName];
2930
});
3031

31-
return res.json(result);
32+
res.json(result);
3233
}

pages/api/libraries/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
127127
res.setHeader('Cache-Control', 'public, s-maxage=600, stale-while-revalidate=300');
128128
}
129129

130-
return res.json({
130+
res.json({
131131
libraries: filteredAndPaginatedLibraries,
132132
total: filteredLibraries.length,
133133
});

pages/api/libraries/statistic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ export default function handler(_: NextApiRequest, res: NextApiResponse) {
113113
res.setHeader('Cache-Control', 'public, s-maxage=600, stale-while-revalidate=300');
114114
res.statusCode = 200;
115115

116-
return res.json(result);
116+
res.json(result);
117117
}

pages/api/library/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
2121

2222
if (!packageNames) {
2323
res.statusCode = 500;
24-
return res.json({
24+
res.json({
2525
error: `Invalid request. You need to specify package names via 'name' query param.`,
2626
});
27+
return;
2728
}
2829

2930
res.statusCode = 200;
30-
return res.json(
31+
res.json(
3132
Object.fromEntries(
3233
packageNames.map(name => [
3334
name,

pages/api/proxy/npm-stat.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
1313

1414
if (!packageName) {
1515
res.statusCode = 500;
16-
return res.json({
16+
res.json({
1717
error: `Invalid request. You need to specify package name via 'name' query param.`,
1818
});
19+
return;
1920
}
2021

2122
const now = Date.now();
@@ -29,9 +30,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
2930

3031
if ('status' in result && result.status !== 200) {
3132
res.statusCode = result.status;
32-
return res.json({});
33+
res.json({});
34+
return;
3335
}
3436

3537
res.statusCode = 200;
36-
return res.json(await result.json());
38+
res.json(await result.json());
3739
}

scripts/build-and-score-data.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,18 @@ async function buildAndScoreData() {
175175
console.warn(
176176
'\n 🚨 The following repositories were unable to fetch from GitHub, they may need to be removed from react-native-libraries.json:'
177177
);
178-
invalidRepos.forEach(repoUrl => console.warn(`- ${repoUrl}`));
178+
invalidRepos.forEach(repoUrl => {
179+
console.warn(`- ${repoUrl}`);
180+
});
179181
}
180182

181183
if (mismatchedRepos.length) {
182184
console.warn(
183185
`\n 🚨 The following projects repository URLs (${mismatchedRepos.length}) are misaligned with the package name extracted from package.json:`
184186
);
185-
mismatchedRepos.forEach(project =>
186-
console.warn(`- ${project.githubUrl}: ${project.github.name}`)
187-
);
187+
mismatchedRepos.forEach(project => {
188+
console.warn(`- ${project.githubUrl}: ${project.github.name}`);
189+
});
188190
}
189191

190192
console.log('📄️ Preparing data file');

0 commit comments

Comments
 (0)