chore: lint

This commit is contained in:
Stephen Zhou 2025-09-19 22:24:30 +08:00
parent 792134d9ae
commit b8eb83fe63
No known key found for this signature in database
5 changed files with 23 additions and 7 deletions

View File

@ -29,7 +29,7 @@ export const BoostModalContent = ({ feedId }: { feedId: string }) => {
const balanceBigInt = cPowerBigInt + dPowerBigInt
const [amount, setAmount] = useState<number>(0)
const amountBigInt = from(amount, 18)[0]
const wrongNumberRange = amountBigInt > balanceBigInt || amountBigInt <= BigInt(0)
const wrongNumberRange = amountBigInt > balanceBigInt || amountBigInt <= 0n
const { data: boostStatus, isLoading } = useBoostStatusQuery(feedId)
const boostFeedMutation = useBoostFeedMutation()

View File

@ -63,7 +63,7 @@ const TipModalContent_: FC<{
const amountBigInt = from(amount, 18)[0]
const wrongNumberRange = amountBigInt > balanceBigInt || amountBigInt <= BigInt(0)
const wrongNumberRange = amountBigInt > balanceBigInt || amountBigInt <= 0n
const { dismiss } = useCurrentModal()

View File

@ -16,7 +16,7 @@
"clsx": "2.1.1",
"foxact": "0.2.49",
"jotai": "2.14.0",
"motion": "12.23.13",
"motion": "12.23.16",
"react": "19.0.0",
"react-blurhash": "0.3.0"
}

View File

@ -41,8 +41,6 @@ export default defineConfig(
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": 0,
"@eslint-react/dom/no-flush-sync": 1,
"@eslint-react/hooks-extra/no-unnecessary-use-callback": "warn",
// NOTE: Disable this temporarily
"react-compiler/react-compiler": 0,
"unicorn/no-array-callback-reference": 0,
"no-restricted-syntax": 0,
"no-restricted-globals": [
@ -54,6 +52,25 @@ export default defineConfig(
"You can use `useLocaltion` or `getReadonlyRoute` to get the route info.",
},
],
// disable react compiler rules for now
"react-hooks/no-unused-directives": "off",
"react-hooks/static-components": "off",
"react-hooks/use-memo": "off",
"react-hooks/component-hook-factories": "off",
"react-hooks/preserve-manual-memoization": "off",
"react-hooks/immutability": "off",
"react-hooks/globals": "off",
"react-hooks/refs": "off",
"react-hooks/set-state-in-effect": "off",
"react-hooks/error-boundaries": "off",
"react-hooks/purity": "off",
"react-hooks/set-state-in-render": "off",
"react-hooks/unsupported-syntax": "off",
"react-hooks/config": "off",
"react-hooks/gating": "off",
"unicorn/require-module-specifiers": "off",
},
},
// use correct tailwind config for eslint

View File

@ -126,8 +126,7 @@ export const useEntriesQuery = (
}
return (
query.data?.pages
?.map((page) => page.data?.map((entry) => entry.entries.id))
.flat()
?.flatMap((page) => page.data?.map((entry) => entry.entries.id))
.filter((id) => typeof id === "string") || []
)
}, [query.data, query.isLoading, query.isError])