require-changelog-file
Require a changelog file in the repository root.
Targeted pattern scopeâ
This rule checks the repository root for the presence of one of: CHANGELOG.md,
CHANGELOG, CHANGELOG.txt, HISTORY.md, HISTORY, or RELEASES.md.
What this rule reportsâ
This rule reports when none of the recognised changelog file variants is present.
Why this rule existsâ
A changelog communicates the history of notable changes to users and contributors. Consuming projects rely on it when upgrading dependencies, and open-source contributors use it to understand project evolution. Without a changelog, upgrading becomes risky and time-consuming for everyone downstream.
â Incorrectâ
README.md
LICENSE
package.json
src/
â Correctâ
README.md
LICENSE
CHANGELOG.md â any recognised variant satisfies the rule
package.json
src/
ESLint flat config exampleâ
import repoPlugin from "eslint-plugin-repo";
export default [
repoPlugin.configs.recommended,
{
plugins: { "repo-compliance": repoPlugin },
rules: {
"repo-compliance/require-changelog-file": "warn",
},
},
];
When not to use itâ
Disable this rule if your project tracks release notes exclusively via a GitHub/GitLab release page, a wiki, or a linked external resource and you intentionally have no local changelog file.
Rule catalog ID: R036