Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.
[Brief description ]
- [more description]
- [more description]
- [more description]
| # Takeout Cursor Rules | |
| You are an expert in cross-platform development with React Native, Expo, TypeScript, React, PostgreSQL, Tamagui, Expo Router, tRPC, Solito, Supabase, and more. You possess deep knowledge of best practices and performance optimization techniques across these technologies. Our codebase is a shared Turborepo called "Takeout". | |
| • Prompt Context: | |
| 1. If the question explicitly mentions any of the tools or technologies listed above or pertains to the Takeout codebase, ensure your answer incorporates best practices relevant to the mentioned technologies. | |
| 2. If the question is about frontend/backend without specific mentions, apply general best practices relevant to the context. | |
| 3. If the question involves general TypeScript or other unrelated tasks, stick to general best practices. | |
| 4. For follow-up questions unrelated to the technologies or content specified in these rules, the rules do not apply. Focus on answering the question without considering the specified best practices unless explicit |
| import { Hono } from 'hono' | |
| import { Suspense } from 'hono/jsx' | |
| import { jsxRenderer } from 'hono/jsx-renderer' | |
| const app = new Hono() | |
| app.get( | |
| '*', | |
| jsxRenderer( | |
| ({ children }) => { |
| import { z } from 'zod'; | |
| import { ZipWriter, BlobReader, configure } from '@zip.js/zip.js'; | |
| // Without this, we get uncaught error due to Workers runtime bug | |
| // See: https://github.com/gildas-lormeau/zip.js/discussions/514 | |
| configure({ | |
| useCompressionStream: false, | |
| }); | |
| // Payload schema that lists the files to be bundled, their filenames and the archive filename |
At the time of writing, namely v1.8.3, Biome does not fully support monorepos yet, but you can wrestle it into working.
Below, we have a typical monorepo (with the changes we're about to make marked in green). It has some workspaces under apps and packages, and at each level of the repo, there are a mixture of files we want to format or ignore.
.
├── .gitignore
+ ├── .vscode| const AnimatedNumbers = () => { | |
| const [numbers, setNumbers] = useState(100_000) | |
| const len = `${numbers}`.length | |
| return ( | |
| <YStack gap="$5"> | |
| <XStack gap="$2"> | |
| <Button | |
| onPress={() => { |
| import { FC } from 'react'; | |
| /** | |
| * Utilities to make Typescript happy wrapping Zeego components with Tamagui's | |
| * styled() components. These utils do nothing except assign Typescript types. | |
| * | |
| * Makes the following props optional and of `unknown` type: | |
| * - children | |
| * - key | |
| * |
| # Documentation: https://github.com/simple-login/app/blob/master/docs/api.md#post-apiv3aliascustomnew | |
| # This script facilitates the bulk creation of email aliases on SimpleLogin.io by automating the API calls needed for each alias. It ensures compliance with rate limits and handles the retrieval of domain-specific signed_suffixes for each alias creation request. | |
| # Author: https://github.com/MyKEms | |
| #!/bin/bash | |
| # Adjust variables | |
| api_key="API_TOKEN" | |
| domain="contoso.com" |
| [...document.querySelectorAll('.notifications-list-item:has(.octicon-git-merge)'), ...document.querySelectorAll('.notifications-list-item:has(.octicon-skip)'), ...document.querySelectorAll('.notifications-list-item:has(.octicon-issue-closed)'), ...document.querySelectorAll('.notifications-list-item:has(.octicon-discussion-closed)'), ...document.querySelectorAll('.notifications-list-item:has(.octicon-git-pull-request-closed)')].forEach(el => el.querySelector('input').click()); setTimeout(() => document.querySelector('button[type="submit"][role="menuitem"][title="Done"].btn').click(), 200) |
12th July, 2023. I'm going to try creating an iOS app called Paranovel, using Expo. My environment for mobile app dev (Xcode, Ruby, etc.) should be in reasonably good shape already as I frequently develop with React Native and NativeScript.
Go to https://docs.expo.dev, and see the Quick Start: npx create-expo-app paranovel
This runs with no problem, then I get this macOS system popup: