Skip to main content

require-dependabot-schedule-interval

Rule catalog ID: R074

Targeted pattern scopeโ€‹

updates[*].schedule.interval values in Dependabot configuration files, including values inherited from multi-ecosystem-groups.

What this rule reportsโ€‹

This rule reports update entries that do not resolve to a valid schedule.interval value.

Why this rule existsโ€‹

schedule.interval is a required Dependabot setting. Requiring a supported value keeps update frequency explicit and avoids accidental reliance on invalid or misspelled scheduling keys.

โŒ Incorrectโ€‹

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule: {}
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "sometimes"

โœ… Correctโ€‹

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"

Additional examplesโ€‹

This rule also accepts valid intervals inherited from multi-ecosystem-groups, so grouped configurations do not need to duplicate schedule frequency on every update block.

ESLint flat config exampleโ€‹

import githubActions from "eslint-plugin-github-actions-2";

export default [githubActions.configs.dependabot];

When not to use itโ€‹

Disable this rule only when Dependabot files are not part of the lint surface for the repository.

Further readingโ€‹