From fa4f9ee3f9cd922875cf077f6d8b74105f0ba55e Mon Sep 17 00:00:00 2001 From: "Xunnamius (Romulus)" Date: Thu, 20 Oct 2022 11:35:46 -0700 Subject: [PATCH] build(lint-staged): add doctoc to pre-commit build process --- lint-staged.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lint-staged.config.js b/lint-staged.config.js index 462b3f5..203b317 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,7 +1,13 @@ 'use strict'; +/** + * These scripts are the constituent parts of the `npm run format` command. + */ module.exports = { - '*.md': 'npx remark --output --frail', + '*.md': [ + 'npx remark --output --ignore-path=.prettierignore --silently-ignore', + 'npx doctoc --no-title --maxlevel=3 --update-only' + ], 'package.json': 'sort-package-json', '*': 'prettier --write --ignore-unknown' };