mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-13 19:16:13 +01:00
- Added Playwright configuration for automated and visual E2E tests - Updated Next.js configuration to accept localhost:3003 for testing - Included Playwright as a dev dependency 💘 Generated with Crush Co-Authored-By: Crush <crush@charm.land>
1.4 KiB
1.4 KiB
CRUSH.md
Build, Lint, and Test Commands
- Build the project:
npm run build - Start the project:
npm run start - Run the project in development:
npm run dev - Lint the project:
npm run lint - Check types:
npm run check-types - Format code:
npm run prettier - Test the project:
npm run test - Run a single test: Use Jest's
-toption, e.g.,npm run test -- -t 'test name'
Code Style Guidelines
Import Conventions
- Use
importstatements for importing modules. - Organize imports using prettier-plugin-organize-imports.
- Import globals from libraries before local modules.
Formatting
- Use Prettier for code formatting.
- Adhere to a line width of 80 characters where possible.
- Use 2 spaces for indentation.
Types
- Utilize TypeScript for static typing throughout the codebase.
- Define interfaces and types for complex objects.
Naming Conventions
- Use camelCase for variable and function names.
- Use PascalCase for component and type/interface names.
Error Handling
- Use
try...catchblocks for async functions. - Handle errors gracefully and log them where required.
Miscellaneous
- Ensure all new components are functional components.
- Prefer arrow functions for component definition.
- Use hooks like
useEffectanduseStatefor managing component state.
Note: Please follow these guidelines to maintain consistency and quality within the codebase.