require-contributing-file
Require CONTRIBUTING.md at the repository root.
Targeted pattern scopeâ
This rule checks the repository root for CONTRIBUTING.md.
What this rule reportsâ
This rule reports repositories that do not publish a contribution guide.
Why this rule existsâ
Without contribution guidelines, every pull request has to rediscover the same process expectations.
A CONTRIBUTING.md file gives contributors one place to find:
- local setup steps
- branch and pull request expectations
- coding standards
- testing and review workflow
â Incorrectâ
// Repository files
// .
// âââ README.md
// âââ package.json
// âââ src/
//
// Missing: CONTRIBUTING.md
â Correctâ
// Repository files
// .
// âââ CONTRIBUTING.md
// âââ README.md
// âââ package.json
ESLint flat config exampleâ
import repoPlugin from "eslint-plugin-repo";
export default [
repoPlugin.configs.recommended,
{
plugins: { "repo-compliance": repoPlugin },
rules: {
"repo-compliance/require-contributing-file": "error",
},
},
];
When not to use itâ
Disable this rule only if the repository is not open to contributions or your organization intentionally centralizes contribution policy outside the repo.
Rule catalog ID: R003