fix(load): only resolve relative formatter paths (#4761)
* fix(load): only resolve relative formatter paths resolveFrom() returns an absolute path on success, which leaks the internal package location into the loaded config when the formatter is a package specifier (e.g. "@commitlint/format"). Under yarn's flat node_modules layout the resolution typically failed and the specifier was preserved by accident; under stricter resolution (pnpm, npm with hoisting disabled) it succeeds and the absolute path appears in config output. Skip resolveFrom for non-relative specifiers and let the runtime resolve them via standard module resolution at import time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(load): clarify resolveFormatter handles only relative paths Address review feedback: the previous wording "relative/custom" was misleading because absolute paths and package specifiers both skip resolveFrom and pass through unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
E
escapedcat committed
f8be0698ff20b211d21d6d7fde7920512cd42845
Parent: c30c418
Committed by GitHub <noreply@github.com>
on 5/12/2026, 12:10:34 PM