RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/hiromaily/go-crypto-wallet

Cursor rule

.cursor/rules/typescript.mdc

TypeScript/JavaScript File Rules

Cursor rules

Quality

100/100

Scores the file, not the repository.

Length

730 words

22 headings · 7 code blocks

Repository

126

— · pushed 102 days ago

Last changed

3 days ago

First indexed 3 days ago.
hiromaily/go-crypto-wallet/.cursor/rules/typescript.mdcRawGitHub
1---
2description: TypeScript/JavaScript File Rules
3globs: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
4alwaysApply: false
5---
6 
7 
8# TypeScript/JavaScript File Rules
9 
10## Overview
11 
12Rules for modifying TypeScript (`*.ts`, `*.tsx`) and JavaScript (`*.js`, `*.jsx`) files in go-crypto-wallet.
13 
14## Applicable Directories
15 
16| App | Language | Runtime | Path | Status |
17| ---------------- | --------------------- | ------- | ------------------------ | -------------------------- |
18| xrpl-grpc-server | TypeScript | **Bun** | `apps/xrpl-grpc-server/` | **READ-ONLY** (deprecated) |
19| eth-contracts | JavaScript/TypeScript | Node.js | `apps/eth-contracts/` | Active |
20 
21## Verification Commands
22 
23**Navigate to app directory first:**
24 
25### xrpl-grpc-server (TypeScript + Bun) - Active Development
26 
27```bash
28cd apps/xrpl-grpc-server
29bun install # Install dependencies (if needed)
30bun run lint # Lint with Biome
31bun run format # Format with Biome
32bun run typecheck # TypeScript type checking
33bun run dev # Run dev server with hot reload
34bun run build # Build for production
35bun run proto # Generate protobuf code
36```
37 
38> **Important**: See @.claude/rules/apps/bun.md for Bun runtime rules.
39> **DO NOT** use `npm`/`npx` commands - always use `bun`/`bunx` instead.
40 
41### eth-contracts (JavaScript/Solidity)
42 
43```bash
44cd apps/eth-contracts
45npm install # Install dependencies (if needed)
46npm run lint # Lint Solidity files
47npm run lint-js # Lint JavaScript/TypeScript files
48npm run fmt # Format all files with Prettier
49npm run build # Compile contracts with Truffle
50npm run test-all # Run all tests
51```
52 
53## Command Summary
54 
55| App | Lint | Format | Build | Test |
56| ---------------- | ----------------- | ---------------- | --------------- | ------------------- |
57| xrpl-grpc-server | `bun run lint` | `bun run format` | `bun run build` | `bun run typecheck` |
58| eth-contracts | `npm run lint-js` | `npm run fmt` | `npm run build` | `npm run test-all` |
59 
60## Code Style
61 
62### TypeScript Best Practices
63 
64```typescript
65// Good: Explicit types
66function getBalance(address: string): Promise<number> {
67 // ...
68}
69 
70// Good: Async/await with error handling
71async function fetchData(): Promise<Data> {
72 try {
73 const result = await api.call();
74 return result;
75 } catch (error) {
76 throw new Error(`Failed to fetch data: ${error.message}`);
77 }
78}
79 
80// Avoid: any type (unless absolutely necessary)
81// Bad: function process(data: any)
82// Good: function process(data: TransactionData)
83```
84 
85### Critical Value Handling
86 
87Never use nullish coalescing (`??`) with empty string for critical values like secrets or keys.
88Instead, throw an error to fail fast and prevent silent failures.
89 
90```typescript
91// Bad: Silently returns empty string if seed is undefined
92const secret = wallet.seed ?? "";
93 
94// Good: Fail fast with explicit error
95if (!wallet.seed) {
96 throw new Error("Failed to generate a wallet seed.");
97}
98const secret = wallet.seed;
99```
100 
101### Module Exports
102 
103Prefer named exports over default exports for consistency and better tooling support.
104 
105```typescript
106// Bad: Mixed exports cause inconsistent import styles
107export const myService = { ... };
108export default myService;
109 
110// Good: Named exports only
111export const myService = { ... };
112```
113 
114### Import Order
115 
1161. Node.js built-ins
1172. External packages
1183. Internal modules
119 
120#### xrpl-grpc-server (xrpl.js 4.5.0)
121 
122```typescript
123import * as path from "path";
124 
125import { Client, Wallet, xrpToDrops, dropsToXrp } from "xrpl";
126import { createConnectRouter } from "@connectrpc/connect";
127 
128import { AccountService } from "./services/account";
129```
130 
131#### eth-contracts
132 
133```typescript
134import * as path from "path";
135 
136import { ethers } from "ethers";
137 
138import { TokenService } from "./services/token";
139```
140 
141## Auto-Generated Files
142 
143**DO NOT EDIT:**
144 
145| App | Generated Files |
146| ---------------- | ---------------------------------------------------------------- |
147| xrpl-grpc-server | `apps/xrpl-grpc-server/src/protogen/` (Buf/ConnectRPC generated) |
148| eth-contracts | `apps/eth-contracts/build/` (Truffle build artifacts) |
149 
150## Security
151 
152- No hardcoded secrets or API keys
153- No sensitive data in logs
154- Input validation at boundaries
155- Use environment variables for configuration
156 
157## Quick Checklist
158 
159### xrpl-grpc-server (Active)
160 
161- [ ] `bun run lint` passes
162- [ ] `bun run format` applied
163- [ ] `bun run typecheck` passes
164- [ ] `bun run build` passes
165- [ ] No `any` types (unless documented reason)
166- [ ] Async errors properly handled
167 
168### eth-contracts
169 
170- [ ] `npm run lint-js` passes
171- [ ] `npm run fmt` applied
172- [ ] `npm run build` passes
173- [ ] `npm run test-all` passes
174 
175## Related Documentation
176 
177- @apps/xrpl-grpc-server/README.md - xrpl-grpc-server documentation
178- @apps/xrpl-grpc-server/docs/MIGRATION-GUIDE.md - Migration guide from ripple-lib
179- @apps/xrpl-grpc-server/package.json - xrpl-grpc-server scripts
180- @apps/eth-contracts/package.json - eth-contracts scripts
181 
182## Related Skills
183 
184- `typescript-development` - Full TypeScript workflow
185- `solidity-development` - For Solidity contracts in eth-contracts
186 
187## Related Rules
188 
189- @.claude/rules/apps/bun.md - Bun runtime rules (use bun/bunx instead of npm/npx)
190- @.claude/rules/apps/xrp-server.md - XRP server directory rules
191 

Commands it names

  • bun install
  • bun run lint
  • bun run format
  • bun run typecheck
  • bun run dev
  • bun run build
  • bun run proto
  • npm install
  • npm run lint
  • npm run lint-js
  • npm run fmt
  • npm run build
  • npm run test-all
  • npm
  • npx
  • bun
  • bunx

Sections

  • TypeScript/JavaScript File Rules
  • Overview
  • Applicable Directories
  • Verification Commands
  • xrpl-grpc-server (TypeScript + Bun) - Active Development
  • eth-contracts (JavaScript/Solidity)
  • Command Summary
  • Code Style
  • TypeScript Best Practices
  • Critical Value Handling
  • Module Exports
  • Import Order
  • Auto-Generated Files
  • Security
  • Quick Checklist
  • xrpl-grpc-server (Active)
  • eth-contracts
  • Related Documentation
  • Related Skills
  • Related Rules

What it covers

setupbuildtestlint-formatcode-stylearchitecturetypessecuritydo-notdocs

Stack — with the evidence

go

(1.00)

bun

(0.85)

biome

(0.70)

typescript

(0.60)

javascript

(0.60)

github-actions

(0.60)

node

(0.50)

Glob targeting

  • **/*.ts
  • **/*.tsx
  • **/*.js
  • **/*.jsx

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
hiromaily
Language
—
License
—
Archived
no

All configs in this repo

Also in hiromaily/go-crypto-wallet

Diff this repo’s formats

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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/agent-files.mdc · 126Cursor rulesgobiome+4lint-formatarchdo-notagent-behaviour77/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/documentation-language.mdc · 126Cursor rulesgobiome+4archdo-notdocs36/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/general.mdc · 126Cursor rulesgobiome+4buildtestarchgit+283/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/github-actions.mdc · 126Cursor rulesgobiome+4stylearchgitperformance+477/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126Cursor rulesgobiome+4buildlint-formatstylearch+396/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/security.mdc · 126Cursor rulesgobiome+4archsecuritydo-notagent-behaviour76/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/shell-script.mdc · 126Cursor rulesgobiome+4setupteststylearch+173/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/ssot.mdc · 126Cursor rulesgobiome+4stylearchtypesdo-not+284/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/task-context-loading.mdc · 126Cursor rulesgobiome+4archtypesdatabasedo-not+193/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/yaml.mdc · 126Cursor rulesgobiome+4lint-formatstylearchtypes+384/1003 days ago
hiromaily/go-crypto-wallet.github/copilot-instructions.md · 126Copilot instructionsgobiome+4teststylearchsecurity+156/1003 days ago
hiromaily/go-crypto-walletAGENTS.md · 126AGENTS.mdgobiome+4archtypesdo-notagent-behaviour+179/1003 days ago
hiromaily/go-crypto-walletCLAUDE.md · 126CLAUDE.mdgobiome+4archtypesdo-notagent-behaviour+179/1003 days ago
hiromaily/go-crypto-walletpkg/AGENTS.md · 126AGENTS.mdgobiome+4stylearchdo-not80/1003 days ago
Diff against .cursor/rules/agent-files.mdc Diff against .cursor/rules/documentation-language.mdc Diff against .cursor/rules/general.mdc Diff against .cursor/rules/github-actions.mdc Diff against .cursor/rules/proto.mdc Diff against .cursor/rules/security.mdc Diff against .cursor/rules/shell-script.mdc Diff against .cursor/rules/ssot.mdc Diff against .cursor/rules/task-context-loading.mdc Diff against .cursor/rules/yaml.mdc Diff against .github/copilot-instructions.md Diff against AGENTS.md Diff against CLAUDE.md Diff against pkg/AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126Cursor rulesgobiome+4buildlint-formatstylearch+396/1003 days ago
nerds-odd-e/doughnut.cursor/rules/cli.mdc · 49Cursor rulestypescriptcypress+14setupbuildteststyle+496/1003 days ago
K-Mistele/opensearch.cursor/rules/default.mdc · 30Cursor rulestypescriptbun+3buildtestlint-formatstyle+294/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/task-context-loading.mdc · 126Cursor rulesgobiome+4archtypesdatabasedo-not+193/1003 days ago
AsharibAli/ramadan-prompting-nights.cursor/rules/frontend.mdc · 29Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+791/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack