puerineros/pixi-rules-general icon
public
Published on 6/15/2025
Sample rule

General rules for pixi js developement

Rules

Build & Development Commands

  • Use npm run dev to launch local development server. - Use npm run build for production builds. - Maintain working build with no TypeScript errors using npx tsc --noEmit.

Testing Guidelines

  • Use Jest for unit testing; tests should follow describe/it pattern. - Test edge cases and UI behavior for PixiJS interactions. - Place tests next to modules using .spec.ts suffix.

Code Style & Guidelines

  • Always use explicit types in TypeScript, avoid any. - Prefer interface over type unless unions or mapped types are needed. - Use readonly where applicable. - Organize PixiJS logic into modular, reusable classes. - Follow PixiJS v7+ standards (app.stage, Container, Sprite, etc).

Documentation Guidelines

  • Keep all module-level doc comments using TSDoc format. - Update README.md when new features are added. - Document any major refactors or component behaviors. - Use meaningful commit messages tied to feature or fix.