require-dependabot-config-file
Require .github/dependabot.yml or .github/dependabot.yaml for automated dependency updates on GitHub.
Targeted pattern scopeâ
This rule checks for .github/dependabot.yml or .github/dependabot.yaml.
What this rule reportsâ
This rule reports repositories that enable GitHub-oriented presets without a Dependabot configuration file.
Why this rule existsâ
Dependabot cannot manage dependency update cadence or security patch pull requests unless the repository declares update policy explicitly.
That makes .github/dependabot.yml (or .github/dependabot.yaml) the baseline
contract for predictable dependency maintenance on GitHub.
â Incorrectâ
// Repository files
// .
// âââ .github/
// â âââ workflows/
// âââ README.md
// âââ package.json
//
// Missing: .github/dependabot.yml or .github/dependabot.yaml
â Correctâ
// Repository files
// .
// âââ .github/
// âââ dependabot.yaml
// âââ workflows/
ESLint flat config exampleâ
import repoPlugin from "eslint-plugin-repo";
export default [
repoPlugin.configs.github,
{
plugins: { "repo-compliance": repoPlugin },
rules: {
"repo-compliance/require-dependabot-config-file": "error",
},
},
];
When not to use itâ
Disable this rule only if the repository intentionally does not use Dependabot for dependency management on GitHub.
Rule catalog ID: R010