{"id":20020612,"url":"https://github.com/sleavely/eslint-pullrequest","last_synced_at":"2026-05-10T03:20:13.900Z","repository":{"id":96718613,"uuid":"604687553","full_name":"Sleavely/eslint-pullrequest","owner":"Sleavely","description":"Run ESLint only on files affected by a PR","archived":false,"fork":false,"pushed_at":"2023-03-02T08:22:26.000Z","size":199,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T16:12:28.801Z","etag":null,"topics":["bitbucket","cli","eslint","github","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Sleavely.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-21T15:28:59.000Z","updated_at":"2023-10-02T06:34:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c387bc9-3d3d-4002-9652-8cd61d032508","html_url":"https://github.com/Sleavely/eslint-pullrequest","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sleavely%2Feslint-pullrequest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sleavely%2Feslint-pullrequest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sleavely%2Feslint-pullrequest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sleavely%2Feslint-pullrequest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sleavely","download_url":"https://codeload.github.com/Sleavely/eslint-pullrequest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241454525,"owners_count":19965405,"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":["bitbucket","cli","eslint","github","pull-requests"],"created_at":"2024-11-13T08:33:16.437Z","updated_at":"2026-05-10T03:20:13.866Z","avatar_url":"https://github.com/Sleavely.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-pullrequest\n\nRun ESLint only on files affected by a PR\n\n[ ![npm version](https://img.shields.io/npm/v/eslint-pullrequest.svg?style=flat) ](https://npmjs.org/package/eslint-pullrequest \"View this project on npm\") [ ![Issues](https://img.shields.io/github/issues/Sleavely/eslint-pullrequest.svg) ](https://github.com/Sleavely/eslint-pullrequest/issues)\n\n## Usage\n\nIn your Bitbucket Pipeline or Github Action, instead of `npx eslint .`:\n```\nnpx eslint-pullrequest\n```\n\nNote that _eslint-pullrequest_ assumes your project already has ESLint installed.\n\n### Arguments\n\nAny flags passed to _eslint-pullrequest_ will be passed to ESLint. See [ESLint CLI reference](https://eslint.org/docs/latest/use/command-line-interface) for inspiration.\n\nFor example:\n\n```\nnpx eslint-pullrequest --format compact\n```\n\n### Environment variables\n\n#### `LINTABLE_EXTENSIONS`\n\n_eslint-pullrequest_ will use your existing ESLint configuration, but because of how ESLint file matching works it will only attempt to lint files involved in the pull request that have the extensions defined in the `LINTABLE_EXTENSIONS` environment variable. The default value is `.js,.ts,.jsx,.tsx`.\n\n#### `MAX_EXEC_BUFFER_MB`\n\nThe size of the buffer that holds ESLints terminal output. Normally you shouldn't have to change this value unless you have hundreds or thousands of linting errors. The default is `10`.\n\n## Using _eslint-pullrequest_ to introduce new linting rules\n\nLet's say you've got a TypeScript project that you want to enable `@typescript-eslint/no-explicit-any` on, but you don't want to rewrite the entire codebase in order to get the linting to pass. We can use a separate configuration for _eslint-pullrequest_ that enforces the boyscout rule of cleaning up as you go.\n\nStart by creating a new ESLint config next to your existing `.eslintrc.js`, lets call it `.eslintrc-newcode.js`:\n\n```js\nmodule.exports = {\n  extends: [\n    './.eslintrc.js',\n  ],\n  rules: {\n    '@typescript-eslint/no-explicit-any': ['error'],\n  },\n}\n```\n\nTweak the _eslint-pullrequest_ command by adding [`-c`](https://eslint.org/docs/latest/use/command-line-interface#-c---config) to use our new config:\n\n```\nnpx eslint-pullrequest -c .eslintrc-newcode.js\n```\n\n## License\n\nThis project uses the MIT license. See [LICENSE.md](./LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleavely%2Feslint-pullrequest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleavely%2Feslint-pullrequest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleavely%2Feslint-pullrequest/lists"}