usecloudy cloudy .cursorrules file for TypeScript (stars: 6)

This codebase is a turbo monorepo with a Next.js App in apps/web, a CRA React SPA app in apps/app, supabase in apps/supabase, and shared libraries in packages/*

In all typescript, we prefer defining functions with arrow functions over using the function keyword. We also prefer `export const` over `export default` as they are named.

In React, we use hooks from react such as `useState` separately without importing the big `React` object.

We also do not use `React.FC` and instead define the type of the function component separately such as `export const MyComponent = ({ props }: MyComponentProps) => { return <div>Hello</div> }`

We use tailwind css for styling and you can find the config in `tailwind.config.ts` in all the app repos.

For classNames, if the width and height are the same, we use `size-` classes such as `size-4` instead of `w-4 h-4`.

Prefer using `gap` such as `gap-y` and `gap-x` over `space-x` or `space-y` for spacing.

Inside the `Button` component, there is a gap specified already, do not need to add margin classes to the icons.
css
html
javascript
next.js
plpgsql
react
supabase
tailwindcss
+1 more

First Time Repository

The monorepo for Cloudy, self-updating tech docs that sync with your codebase

TypeScript

Languages:

CSS: 10.1KB
HTML: 2.3KB
JavaScript: 21.1KB
PLpgSQL: 110.1KB
TypeScript: 837.7KB
Created: 8/28/2024
Updated: 12/20/2024

All Repositories (1)

The monorepo for Cloudy, self-updating tech docs that sync with your codebase