{"id":20849465,"url":"https://github.com/john-waitforit/action-eslint-leaderboard","last_synced_at":"2025-05-12T04:30:43.194Z","repository":{"id":37961393,"uuid":"461128495","full_name":"john-waitforit/action-eslint-leaderboard","owner":"john-waitforit","description":"A Github action to generate leaderboards of top \"eslint fixers\" from Pull Requests","archived":false,"fork":false,"pushed_at":"2022-11-28T14:36:33.000Z","size":797,"stargazers_count":19,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-03T20:48:29.506Z","etag":null,"topics":["action","gamification","github-actions","leaderboard","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/john-waitforit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-19T08:15:07.000Z","updated_at":"2024-09-17T20:59:12.000Z","dependencies_parsed_at":"2023-01-11T17:21:26.683Z","dependency_job_id":null,"html_url":"https://github.com/john-waitforit/action-eslint-leaderboard","commit_stats":{"total_commits":46,"total_committers":2,"mean_commits":23.0,"dds":0.04347826086956519,"last_synced_commit":"61768c7ee38a9dd4a5c9589e0332ee9b6eaa7692"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-waitforit%2Faction-eslint-leaderboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-waitforit%2Faction-eslint-leaderboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-waitforit%2Faction-eslint-leaderboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-waitforit%2Faction-eslint-leaderboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/john-waitforit","download_url":"https://codeload.github.com/john-waitforit/action-eslint-leaderboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253675086,"owners_count":21945894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","gamification","github-actions","leaderboard","typescript"],"created_at":"2024-11-18T03:05:16.222Z","updated_at":"2025-05-12T04:30:42.606Z","avatar_url":"https://github.com/john-waitforit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛡 Eslint leaderboard (Github Action)\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/actions/typescript-action/actions\"\u003e\u003cimg alt=\"typescript-action status\" src=\"https://github.com/actions/typescript-action/workflows/build-test/badge.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nHave you always wondered how to improve quality on your projects?\n\nLook no further!\n\nWith this github action, you'll be able to automatically generate a leaderboard of your eslint heroes[^1] and add it to your pull requests.\n\n![leaderboard-screenshot](./images/leaderboard-screenshot.png)\n\n\u003e **Warning**\n\u003e\n\u003e Disclaimer, eslint is not perfect. Removing eslint warnings/errors might introduce regressions if not properly tested.\n\n## 🏃 Quickstart\n\nTo use this github action, create a new workflow in your `.github` folder:\n\n```yml\nname: 'Eslint Heroes'\n\non: pull_request\n\njobs:\n  pull-request-comment:\n    runs-on: ubuntu-latest\n    timeout-minutes: 3\n    steps:\n      - uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n      - run: git checkout ${{ github.event.pull_request.base.ref }} # Necessary to add main in the git branches\n      - run: git checkout ${{ github.event.pull_request.head.ref }} # Necessary to get the list of commits between head and master\n      - uses: john-waitforit/action-eslint-leaderboard@v0.9.13\n        id: 'action-eslint-leaderboard'\n        with:\n          ignorePattern: 'generated'\n      - uses: marocchino/sticky-pull-request-comment@v2\n        with:\n          header: eslint-heroes # this is hidden, only used to update existing comment instead of creating new ones\n          message: ${{ steps.action-eslint-leaderboard.outputs.pr-comment }}\n```\n\nThis is it, open a PR with this change and you should see a comment posted within 3 minutes :)\nOnce merged, future PRs including this workflow will also have a leaderboard.\n\n## 📝 Pre-requisites\n\nThis action relies on the git diff and the addition \u0026 removal on lines containing `eslint-disable`.\n\nThis means that if you have eslint rules set as warnings, they will not be counted in the leaderboard.\n\nMy recommendation is to set all your rules as errors (in your .eslint.json or equivalent config). When doing that, you will probably end up with a lot of outstanding errors blocking your CI. You can use [clinter](https://github.com/theodo/clinter) to automatically insert `eslint-disable` comments.\n\n## ⚙️ How does it work?\n\nEverything is computed on the fly so no server / database are needed.\n\nThe source of truth is your git history, this action simply goes through the commits and the git diff and counts the lines added/removed that contain `eslint-disable`.\n\nBecause it only computes the score of the current week the number of commits is reasonable (usually below 1 000) which means the action runs within 1 min.\n\n[^1]: Eslint hero: nickname for an amazing dev removing eslint warnings and improving the codebase quality.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohn-waitforit%2Faction-eslint-leaderboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohn-waitforit%2Faction-eslint-leaderboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohn-waitforit%2Faction-eslint-leaderboard/lists"}