

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234567# TypeScript Coding Standards89## Naming Conventions1011- Interface names must start with `i` and use PascalCase.12 - Example: `iUser`, `iAuthPayload`, `iComponentProps`13- Type aliases must end with `Type` and use camelCase.14 - Example: `authType`, `tokenResponseType`15- Use self-explanatory names for:16 - Variables (e.g., `currentUserId`, not `id`, `i`, or `k`)17 - Functions (e.g., `calculateTotal`, not `calc`)18 - Enums, types, and interfaces1920## Function Style2122- Avoid single-line arrow functions **without explicit `return`**. Always use a block body for clarity, even if it's one line.23 - Preferred:24```ts25 const getUserName = (user: iUser): string => {26 return user.name;27 };28```29 - Avoid:30```ts31 const getUserName = (user: iUser): string => user.name;32```3334- Avoid using `.then()` for asynchronous code. Prefer `async/await` for better readability and error handling.3536 - Preferred:37```ts38 const userName = await getUserNameById(id);39```4041 - Avoid:42```ts43 getUserNameById(id).then((name) => console.log(name));44```4546## Spacing & Grouping4748- Add empty lines between:49 - Logical code blocks50 - Variable declarations and function calls51 - Different hook calls in React (e.g., between `useState` and `useEffect`)52- This improves readability and visual grouping of logic.5354## Documentation5556- Use JSDoc for all exported and non-exported functions and complex utilities.57- Comment inside function bodies to explain:58 - Non-obvious logic59 - Side effects60 - State or variable and constant's intent6162## Readability & Maintainability6364- Keep functions short and focused. Extract logic into helper functions if they do more than one thing.65- Avoid deeply nested conditionals. Use early returns where appropriate.66- Use `const` by default. Only use `let` when mutation is required.67- Avoid magic numbers or strings. Replace with enums or named constants.68- Avoid chaining `.map()`, `.filter()`, etc., inline. Prefer writing logic in a more declarative, readable structure, even if it spans multiple lines.6970## Imports7172- Group imports in the following order:73 1. External libraries74 2. Aliased internal modules (e.g., `@/services`)75 3. Relative imports76- Separate import groups with a blank line.7778## Type Safety7980- Always define types for props, return values, and function arguments.81- Prefer TypeScript types/interfaces over `any`.82- Avoid unnecessary `as` type assertions unless narrowing is required.8384## Example8586```ts87import { getUserById } from "@/services/userService";8889export enum UserRole {90 Admin = "admin",91 Editor = "editor",92 Viewer = "viewer",93}9495interface iUserProps {96 id: string;97 name: string;98 role: UserRole;99}100101/**102 * Fetches the user name based on user ID.103 */104const getUserNameById = async (userId: string): Promise<string> => {105 const user = await getUserById(userId);106107 // Return the name of the user if found108 return user.name;109};110```111
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| PluteoJS/next-js-typescript-starter.cursor/rules/project-structure.mdc · 3 | Cursor rules | stylearch | 33/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/project-ui-style-guide.mdc · 3 | Cursor rules | lint-formatstylearchui+1 | 77/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/react-component.mdc · 3 | Cursor rules | stylearchtypesui+1 | 66/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/react-typescript.mdc · 3 | Cursor rules | stylearchtypesui | 58/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/shadcn-usage.mdc · 3 | Cursor rules | uido-not | 40/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starterCLAUDE.md · 3 | CLAUDE.md | lint-formatarchtypesdo-not | 88/100 | 14 days ago | |
| PluteoJS/next-js-typescript-startersrc/components/CLAUDE.md · 3 | CLAUDE.md | archdo-not | 47/100 | 14 days ago | |
| PluteoJS/next-js-typescript-startersrc/services/CLAUDE.md · 3 | CLAUDE.md | setuparchtypessecurity+1 | 54/100 | 14 days ago | |
| PluteoJS/next-js-typescript-startersrc/store/CLAUDE.md · 3 | CLAUDE.md | stylearch | 58/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/pluteojs-next-js-typescript-starter-cursor-rules-typescript-coding)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.