How to contribute
There are many ways to contribute to MD Viewer:- Report bugs: Create an issue describing the bug and steps to reproduce
- Suggest features: Open an issue with your feature idea and use case
- Submit pull requests: Fix bugs, add features, or improve documentation
- Improve documentation: Help make the docs clearer and more comprehensive
Development setup
Before contributing, make sure you have your development environment set up. See the Development setup guide for detailed instructions.Create a branch
Create a new branch for your changes:Use descriptive branch names:
feature/for new featuresfix/for bug fixesdocs/for documentation changes
Test thoroughly
Test your changes in the development environment:Ensure the application works as expected and no errors appear in the console.
Code style
MD Viewer uses ESLint to maintain consistent code quality.ESLint configuration
The project uses a modern ESLint flat config with the following rules:- JavaScript recommended rules:
@eslint/jsrecommended config - React Hooks rules: Enforces rules of hooks
- React Refresh: Ensures components can be hot-reloaded
- Custom rules:
- Unused variables are errors, except for uppercase names (constants)
Code conventions
- Use functional components with hooks
- Use arrow functions for component definitions
- Use const for immutable values, let for mutable values
- Use destructuring when accessing props and state
- Keep components focused and single-purpose
- Add comments for complex logic
Component guidelines
When creating or modifying components:File organization
- Place new components in
src/components/ - Use
.jsxextension for files containing JSX - Name files using PascalCase matching the component name
Component structure
Styling guidelines
- Use semantic class names
- Define component-specific styles in the component’s CSS file
- Use CSS custom properties for colors and spacing
- Maintain the glassmorphism aesthetic
Pull request process
Commit your changes
Write clear, descriptive commit messages:Good commit message examples:
Fix: Sidebar not closing on mobileAdd: Export to PDF functionalityUpdate: Improve markdown table rendering
Create pull request
Go to the original repository on GitHub and create a pull request:
- Provide a clear title describing the change
- Describe what changes you made and why
- Reference any related issues
- Include screenshots for UI changes
Testing
Currently, MD Viewer does not have an automated test suite. When contributing:- Manually test all affected functionality
- Test in different browsers (Chrome, Firefox, Safari)
- Verify drag-and-drop file upload works
- Check that markdown rendering is correct
- Ensure local storage persistence works
We welcome contributions to add automated testing to the project!
What to work on
Look for issues labeled:good first issue: Great for newcomershelp wanted: We need community helpbug: Bug fixes are always welcomeenhancement: New features and improvements
Questions?
If you have questions about contributing:- Open an issue with your question
- Check existing issues for similar questions
- Review the Architecture guide for technical details