Skip to content

Latest commit

 

History

History
126 lines (104 loc) · 7.25 KB

CONTRIBUTION.md

File metadata and controls

126 lines (104 loc) · 7.25 KB

CONTRIBUTION

First off, thank you so much for considering a contribution to our project. We welcome contributions from everyone!

How can I contribute?

Contributing is simple. Here's how you can do it:

  1. Identify an Issue: Look for existing Issues or create your own explaining the feature or fix.
  2. Fork the Repository: Click on the fork button in the top right corner.
  3. Clone the Repository: After forking, clone the repo to your local machine to make changes.
  4. Set up Your Environment: Set up the repository by following the instructions in the setup section of the README.md.
  5. Create a New Branch: Before making any changes, switch to a new branch:
    git checkout -b your-new-branch-name
    
  6. Make Changes: Implement your feature or fix.
  7. Run Tests: Ensure your changes do not break any existing functionality.
  8. Write Commit Messages: Follow the Conventional Commit Messages format.
  9. Push to GitHub: After committing your changes, push them to GitHub:
    git push origin your-new-branch-name
    
  10. Submit a Pull Request: Go to your repository on GitHub and click the 'Compare & pull request' button. Fill in the details and submit.

Guidelines

Git commit messages

We adhere to the Conventional Commit Messages standard to maintain a clear history.

Coding style guide

We use ESLint integrated with Prettier to enforce a consistent code style. Ensure your submissions are compliant by running ESLint checks locally:

  • .prettierrc configuration

    {
        "semi": true,
        "singleQuote": true,
        "arrowParens": "always",
        "trailingComma": "es5",
        "bracketSpacing": true,
        "tabWidth": 4,
        "useTabs": false,
        "endOfLine": "crlf",
        "overrides": [
            {
                "files": "*.json",
                "options": {
                    "tabWidth": 2
                }
            }
        ]
    }
    
  • eslint.config.mjs

    export default {
        // Specifies the types of files ESLint will lint
        files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
    
        // Language options define the ECMAScript features and global variables
        languageOptions: {
            ecmaVersion: 2020, // Allows parsing of modern ECMAScript features
            sourceType: 'module', // Treats files as ECMAScript modules
            globals: {
                jest: 'readonly', // Indicates global variables provided by Jest that should not be overwritten
            },
        },
    
        // Linter options for managing the linting process
        linterOptions: {
            reportUnusedDisableDirectives: true, // Reports unused eslint-disable comments
        },
    
        // Plugins extend ESLint with new settings, environments, rules, and so on
        plugins: {
            jest: {}, // Adds Jest testing support
            security: {}, // Adds additional rules for security
            prettier: {}, // Integrates Prettier for code formatting
        },
    
        // Rules define how ESLint applies linting to the code
        rules: {
            'no-console': 'warn', // Warns about console usage
            'func-names': 'off', // Turns off the requirement to name functions
            'no-underscore-dangle': 'off', // Allows dangling underscores in identifiers
            'consistent-return': 'off', // Does not require function return values to be consistent
            'jest/expect-expect': 'off', // Turns off a rule that expects a Jest test to have an assertion
            'security/detect-object-injection': 'off', // Disables a security rule about object injection that may not be applicable
            quotes: [
                'error', // Enforces the use of single quotes
                'single',
                { avoidEscape: true, allowTemplateLiterals: true },
            ],
            semi: ['error', 'always'], // Requires semicolons at the end of statements
            'prefer-arrow-callback': ['error', { allowNamedFunctions: false }], // Enforces the use of arrow functions for callbacks
            'prefer-const': 'error', // Requires use of const for variables that are never reassigned
            'arrow-spacing': ['error', { before: true, after: true }], // Enforces space around the arrow of arrow functions
            'no-var': 'error', // Requires let or const, not var
            'object-shorthand': ['error', 'always'], // Requires object literal shorthand syntax
            'prefer-template': 'error', // Prefers template literals over string concatenation
        },
    
        // Paths to ignore during linting
        ignores: [
            '.idea/**', // Ignores all files in the .idea folder
            'node_modules/**', // Ignores all files in node_modules
            'build/**', // Ignores all files in the build output directory
            'logs/**', // Ignores log files
            'yarn.lock', // Ignores the yarn lock file
        ],
    };

Code Review Process

All submissions, including submissions by project maintainers, require review. We use GitHub pull requests for this process. The core team members review the pull requests regularly and provide feedback. We aim to respond to pull requests within one week. If your pull request is particularly urgent, please mention this in the request.

Community and Communication

Follow discussions in the GitHub Issues section of our repository.