Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"error",
{
"vars": "all",
"args": "none",
"ignoreRestSiblings": true,
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_"
Expand Down Expand Up @@ -77,9 +76,12 @@
"jsx-a11y/anchor-has-content": "error",
"jsx-a11y/anchor-is-valid": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/aria-role": "error",
"jsx-a11y/heading-has-content": "error",
"jsx-a11y/html-has-lang": "error",
"jsx-a11y/img-redundant-alt": "error",
"jsx-a11y/label-has-associated-control": "error",
"jsx-a11y/no-aria-hidden-on-focusable": "error",
"jsx-a11y/no-noninteractive-tabindex": "error",
"jsx-a11y/no-redundant-roles": "error",
"jsx-a11y/prefer-tag-over-role": "off",
Expand Down Expand Up @@ -107,8 +109,7 @@
"nextjs/no-unwanted-polyfillio": "error",
"promise/always-return": "error",
"promise/no-callback-in-promise": "error",
"react-hooks/rules-of-hooks": "error",
"react/button-has-type": "error",
"react/exhaustive-deps": "error",
"react/forward-ref-uses-ref": "error",
"react/jsx-boolean-value": ["error"],
"react/jsx-curly-brace-presence": ["error"],
Expand All @@ -123,23 +124,27 @@
],
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-undef": "error",
"react/jsx-no-useless-fragment": "error",
"react/no-array-index-key": "error",
"react/no-did-mount-set-state": "error",
"react/no-direct-mutation-state": "error",
"react/no-redundant-should-component-update": "error",
"react/no-render-return-value": "error",
"react/no-string-refs": "error",
"react/no-this-in-sfc": "error",
"react/no-unknown-property": "error",
"react/no-unescaped-entities": "error",
"react/no-will-update-set-state": "error",
"react/rules-of-hooks": "error",
"react/self-closing-comp": "error",
"react/style-prop-object": "error",
"react/void-dom-elements-no-children": "error",
"typescript/await-thenable": "error",
"typescript/ban-ts-comment": [
"error",
{
"minimumDescriptionLength": 3,
"ts-expect-error": "allow-with-description",
"ts-check": false,
"ts-expect-error": "allow-with-description",
"ts-ignore": true,
"ts-nocheck": true
}
Expand All @@ -151,14 +156,20 @@
"fixStyle": "inline-type-imports"
}
],
"typescript/no-array-delete": "error",
"typescript/no-confusing-non-null-assertion": "error",
"typescript/no-confusing-void-expression": [
"error",
{
"ignoreArrowShorthand": true
}
],
"typescript/no-duplicate-type-constituents": "error",
"typescript/no-extra-non-null-assertion": "error",
"typescript/no-floating-promises": "error",
"typescript/no-for-in-array": "error",
"typescript/no-inferrable-types": "error",
"typescript/no-meaningless-void-operator": "error",
"typescript/no-misused-promises": [
"error",
{
Expand All @@ -167,6 +178,7 @@
],
"typescript/no-restricted-types": "error",
"typescript/no-unnecessary-boolean-literal-compare": "error",
"typescript/no-unnecessary-parameter-property-assignment": "error",
"typescript/no-unnecessary-type-arguments": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-unnecessary-type-constraint": "error",
Expand Down
104 changes: 52 additions & 52 deletions bun.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions components/Explore/ExploreSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ function renderLibs(list: LibraryType[]) {
const now = Date.now();
return list
.filter(({ github }) => now - new Date(github.stats.updatedAt).getTime() < UPDATED_IN)
.map((item: LibraryType, index: number) => (
.map(item => (
<LibraryWithLoading
key={`explore-item-${index}-${item.github.name}`}
key={`explore-item-${item.npmPkg}`}
library={item}
showTrendingMark
skipMetadata
Expand Down
4 changes: 2 additions & 2 deletions components/Home/HomeSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ export default function HomeSection({
function renderLibs(list: LibraryType[], count: number) {
return list
.splice(0, count)
.map((item: LibraryType, index: number) => (
.map(item => (
<LibraryWithLoading
key={`home-item-${index}-${item.github.name}`}
key={`home-item-${item.npmPkg}`}
library={item}
skipMetadata
skipSecondaryMetadata
Expand Down
4 changes: 2 additions & 2 deletions components/Libraries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export default function Libraries({ libraries }: Props) {

return (
<View style={tw`pt-3`}>
{libraries.map((item, index) => (
<LibraryWithLoading key={`list-item-${index}-${item.github.name}`} library={item} />
{libraries.map(item => (
<LibraryWithLoading key={`list-item-${item.npmPkg}`} library={item} />
))}
</View>
);
Expand Down
4 changes: 2 additions & 2 deletions components/Library/DirectoryScore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export function DirectoryScore({ score, matchingScoreModifiers, sizeMultiplier =
</strong>
<br />
<ul style={tw`m-0 pl-3.5 text-[12px]`}>
{matchingScoreModifiers.map((mod, index) => (
<li key={`mod-${index}`}>{mod}</li>
{matchingScoreModifiers.map(mod => (
<li key={`mod-${mod}`}>{mod}</li>
))}
</ul>
</Tooltip>
Expand Down
4 changes: 2 additions & 2 deletions components/Library/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export default function Library({
</View>
{!skipMetadata && Platform.OS === 'web' && library.images && library.images.length > 0 && (
<View style={tw`mt-2 flex-row flex-wrap items-center gap-x-0.5`}>
{library.images.map((image, index) => (
<Thumbnail key={`${image}-${index}`} url={image} />
{library.images.map(image => (
<Thumbnail key={image} url={image} />
))}
</View>
)}
Expand Down
2 changes: 1 addition & 1 deletion components/Package/MarkdownContentBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function MarkdownContentBox({ packageName, library, loader = fals
isValidElement<{ href?: string }>(element) &&
isGitHubVideoAssetLink(element.props.href)
) {
return <>{children}</>;
return children;
}
}

Expand Down
4 changes: 3 additions & 1 deletion components/Package/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { View } from 'react-native';

import { P } from '~/common/styleguide';
import { Button } from '~/components/Button';
import ContentContainer from '~/components/ContentContainer';
Expand All @@ -10,7 +12,7 @@ export default function NotFound() {
return (
<>
<PageMeta title="Error" description="Nothing was found! Go back to the directory home." />
<Navigation header={<></>} />
<Navigation header={<View />} />
<ContentContainer>
<NotFoundContent
header="Nothing was found! Go back to the directory home."
Expand Down
Loading