Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to the Markdown Editor project.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/markdown-editor.git - Install dependencies:
npm install - Create a feature branch:
git checkout -b feature/your-feature-name
- We use TypeScript with strict mode enabled
- Prettier for code formatting (runs automatically on commit)
- ESLint for code quality
- Follow existing patterns in the codebase
- Use functional components with TypeScript
- Place components in appropriate directories under
src/components/ - Include proper TypeScript types
- Add JSDoc comments for complex logic
Example:
interface ButtonProps {
label: string;
onClick: () => void;
variant?: 'primary' | 'secondary';
}
export const Button: React.FC<ButtonProps> = ({
label,
onClick,
variant = 'primary'
}) => {
// Component logic
};- Use Zustand stores for global state
- Keep component state local when possible
- Follow the existing store patterns
- Write tests for new features
- Ensure existing tests pass:
npm test - Test files should be colocated with components
- Update documentation for any API changes
- Ensure all tests pass
- Update the README.md if needed
- Submit PR with clear description of changes
Follow conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changesrefactor:Code refactoringtest:Test additions/changeschore:Build process or auxiliary tool changes
Feel free to open an issue for any questions or concerns.