Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 3.83 KB

CONTRIBUTING.md

File metadata and controls

72 lines (52 loc) · 3.83 KB

Contributing to leaderboards.gg

We appreciate your help!

Discord

  • If you have any questions, comments, concerns that don't fit in GitHub please direct them here!

Before filing an issue

If you are unsure whether you have found a bug, please consider asking in our discord first.

Similarly, if you have a question about a potential feature, the discord can be a fantastic resource for first comments.

Filing issues

Filing issues is as simple as going to the issue tracker, and adding an issue using one of the templates as listed below:

Contributing code

Example code contribution flow

  1. Make a fork of this repo.
  2. Name a branch on your fork something descriptive for this change (e.g. UpdateNavbarStyles).
  3. Commit your changes (Tip! Please read our Style guide to help the pull request process go smoothly).
  4. Verify your changes work.
  5. Push your branch.
  6. Open a pull request to leaderboardsgg/leaderboard-site.
  7. Get your pull request approved.
  8. Get someone to click Rebase and merge.
  9. Celebrate your amazing changes! 🎉

Style guide

General

  • Be inclusive, this is a project for everyone.
  • Be descriptive, it can be hard to understand abbreviations or short-hand.
    • prefer catch(error) over catch(e)
  • Make sure that your components are responsive.
  • Two major philosophies we adhere to are KISS (keep it super simple) and DRY (don't repeat yourself)
    • In general try not to make your code too "clever" if it's possible to do it in a less "clever" way so that it's easily read by other contributors.

Nuxt/Vue

  • Comments should be full sentences, starting with a capital letter and ending with punctuation.

  • Comments above a function should start with the name of the thing being described.

  • Make sure any data and prop names are as descriptive as possible.

  • Try to move any repetitive elements into child components to reduce clutter in parent components.

  • Prefer usage of async/await for asynchronous functions.

    • only use Promise syntax for needed more advanced Async programming that either can't be done or is harder to be done with async/await
  • Include proper error handling for any async functions.

  • Make all components compatible with server side rendering where possible.

Git

  • Try to have an informative branch name for others e.g. LBGG-{issue number}-{ghusername}.
    • Do not make pull requests from main.
    • Do not include slashes in your branch name.
      • Nested paths can act strange when other people start looking at your branch.
  • Try to keep commit line length below 80 characters.
  • All commit titles should be of the format {area} {optional sub-area}: commit description.
    • This will help people reading through commits quickly find the relevant ones.
    • Some examples might include:
      • profile header: add support for badges
      • leaderboard: adjusted sidebar spacing
  • Commits should be as atomic as possible.