From 4895d5ffba4c04a5643fade834ce4ba443a42aaa Mon Sep 17 00:00:00 2001 From: Tomas Date: Tue, 11 Aug 2020 03:56:54 +0200 Subject: [PATCH] Use read dafult export - requiring with CommonJS (#2057) Suggesting a change that made my local setup work. --- docs/reference-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference-api.md b/docs/reference-api.md index abe671d78c..0ed9d63dc1 100644 --- a/docs/reference-api.md +++ b/docs/reference-api.md @@ -291,7 +291,7 @@ read(range: Range) => Promise ```js // git commit -m "I did something" -const read = require('@commitlint/read'); +const read = require('@commitlint/read').default; read({edit: true}).then((messages) => console.log(messages)); // => ['I did something\n\n']