From 48d7667355ca3d7c086a6a1d5b5d4ddddb50bd18 Mon Sep 17 00:00:00 2001 From: Robert Kieffer Date: Tue, 24 Dec 2024 14:49:31 -0800 Subject: [PATCH 1/2] fix: prettier dependencies --- cli.js | 3 +-- package.json | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cli.js b/cli.js index bdf2ad0..819b669 100755 --- a/cli.js +++ b/cli.js @@ -54,13 +54,12 @@ async function run(curr, prev) { try { const prettier = require('prettier'); const config = await prettier.resolveConfig(outputPath); - console.log('CONFIG', config); markdown = await prettier.format(markdown, { parser: 'markdown', ...config }); } catch (err) { - // Ignore + console.log(`Formatting skipped (${err.message})`); } // Write to output (file or stdout) diff --git a/package.json b/package.json index c1d9892..df606d6 100644 --- a/package.json +++ b/package.json @@ -32,14 +32,17 @@ }, "dependencies": { "minimist": "1.2.8", - "prettier": "3.4.2", "require-like": "0.1.2" }, + "peerDependencies": { + "prettier": "^3.4.2" + }, "devDependencies": { "@commitlint/config-conventional": "19.6.0", "ava": "6.2.0", "commitlint": "19.6.1", "husky": "9.1.7", + "prettier": "3.4.2", "npm-run-all": "4.1.5" }, "scripts": { From 57db2849551260a36c11e9363d3e94a9b1a8659c Mon Sep 17 00:00:00 2001 From: Robert Kieffer Date: Tue, 24 Dec 2024 14:50:09 -0800 Subject: [PATCH 2/2] chore: fixup husky scripts --- .husky/pre-commit | 3 --- 1 file changed, 3 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 449fcde..72c4429 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npm test