Public
Like
3
github-place
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v57View latest version
- Format:
deno fmt
- Lint:
deno lint
- Test all:
deno test
- Test single file:
deno test path/to/file.ts
- Test with filter:
deno test --filter "name"
- Test with permissions:
deno test --allow-read
- Use TypeScript/TSX for all code; add types/interfaces for all data structures.
- Imports: Use
https://esm.sh/
or Val Town URLs, always pin versions (e.g.,@4.6.12
). - Never hardcode secrets; use environment variables.
- Prefer official SDKs/libraries over raw API calls.
- Use ES6+ and functional programming where possible.
- Naming: PascalCase for types/interfaces, camelCase for variables/functions, UPPER_SNAKE_CASE for constants.
- Add comments for complex logic; avoid obvious comments.
- Let errors bubble unless you can resolve locally; avoid catch blocks that just log or return 500s.
- For React: Pin all dependencies to 18.2.0 and use
/** @jsxImportSource https://esm.sh/react@18.2.0 */
. - Use TailwindCSS via CDN for styling unless otherwise specified.
- Ask clarifying questions if requirements are ambiguous.
- Provide complete, functional solutions and test edge cases.
- Refactor complex code into subcomponents.
- Follow Val Town platform requirements and utility usage.
For more, see .cursorrules
and deno.json
in the repo root.