conventional-changelog-eslint

raw JSON →
6.1.0 verified Sat Apr 25 auth: no javascript

ESLint preset for conventional-changelog. Generates changelogs from Git commits following the ESLint convention (Fix, Update, New, Breaking, Docs, Build, Upgrade, Chore). Current stable version 6.1.0, released as part of the conventional-changelog monorepo. ESM-only, requires Node >=18. Compared to other presets (e.g., angular, conventionalcommits), this preset enforces ESLint-specific tags and format.

error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/node_modules/conventional-changelog-eslint/index.js from /path/project.js not supported.
cause Trying to require() an ESM-only package.
fix
Use import instead: import { createPreset } from 'conventional-changelog-eslint'
error TypeError: preset is not a function
cause Passing the string 'eslint' as preset to conventional-changelog instead of using createPreset().
fix
Use const preset = await createPreset(); and pass the returned object.
breaking v6.x dropped CommonJS support, switched to ESM-only.
fix Use import syntax and Node >=18. Convert CJS project or use dynamic import().
breaking Node.js <18 no longer supported.
fix Upgrade Node.js to >=18.
deprecated Direct use of `conventional-changelog-eslint` as a string preset name is deprecated; use `createPreset()` function instead.
fix Import and call `createPreset()` to get the preset object.
gotcha Commit messages must follow the exact ESLint tag format (e.g., 'Fix: '). Non-conforming commits may be parsed incorrectly.
fix Ensure commits use one of: Fix, Update, New, Breaking, Docs, Build, Upgrade, Chore.
npm install conventional-changelog-eslint
yarn add conventional-changelog-eslint
pnpm add conventional-changelog-eslint

Generate a changelog using the ESLint preset with conventional-changelog.

import { createPreset } from 'conventional-changelog-eslint';
import conventionalChangelog from 'conventional-changelog';

const preset = await createPreset();
const changelogStream = conventionalChangelog({
  preset,
  releaseCount: 1,
});
changelogStream.pipe(process.stdout);