Contributing to DiracX-Web
Requirements: Setup Environment
Ensure that any code you write is well-documented. This includes:
- Component Testing
- Write tests for your stories to ensure they work as expected. Use Jest for unit testing and snapshot testing of your React components.
- Application Testing
- Use Cypress for end-to-end testing to simulate real user interactions and ensure your application behaves correctly.
- Test Coverage
- Maintain good test coverage to ensure that your critical features are well-protected during updates. Tools like Jest provide coverage reports that help you identify untested parts of your code.
Make your application accessible to all users. Use semantic HTML, ARIA attributes, and test your application with different screen sizes and assistive technologies.
Note
If you create an export function or component in diracx-web-components, you must add it to the index.ts file and run npm run build inside packages/diracx-web-components to ensure the pre-commit hook passes.
Warning
Don't forget to update the packages/extensions code if you integrate breaking changes in the diracx-web-components library. See Managing the extension for further details.
Pre-commit Hooks
Husky is configured to run as a pre-commit script, executing tasks such as linting staged files to maintain code consistency with the codebase.