From cd506cd085ae08886b05fe6c3254cd902ca6d96d Mon Sep 17 00:00:00 2001 From: jrhizor Date: Thu, 22 Dec 2022 12:51:18 -0800 Subject: [PATCH] test husky --- .husky/pre-commit | 12 --------- action/.husky/pre-commit | 5 ++++ cli/.husky/pre-commit | 5 ++++ cli/src/helpers/local/configFileGlobal.ts | 30 ++++++++++------------- 4 files changed, 23 insertions(+), 29 deletions(-) delete mode 100755 .husky/pre-commit create mode 100755 action/.husky/pre-commit create mode 100755 cli/.husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index fcca4628..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -( - cd action - npx lint-staged -) - -( - cd cli - npx lint-staged -) diff --git a/action/.husky/pre-commit b/action/.husky/pre-commit new file mode 100755 index 00000000..f195bec7 --- /dev/null +++ b/action/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +cd action +npx lint-staged diff --git a/cli/.husky/pre-commit b/cli/.husky/pre-commit new file mode 100755 index 00000000..e4220545 --- /dev/null +++ b/cli/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +cd cli +npx lint-staged diff --git a/cli/src/helpers/local/configFileGlobal.ts b/cli/src/helpers/local/configFileGlobal.ts index 07fe71dc..b114fad3 100644 --- a/cli/src/helpers/local/configFileGlobal.ts +++ b/cli/src/helpers/local/configFileGlobal.ts @@ -1,15 +1,12 @@ import chalk from 'chalk'; -import fs, {FSWatcher, readFileSync, WatchEventType} from 'fs'; +import fs, { FSWatcher, readFileSync, WatchEventType } from 'fs'; import { getTypedStoatConfig, readStoatConfig } from '../../../../action/src/configHelpers'; import { StoatConfigSchema } from '../../../../action/src/schemas/stoatConfigSchema'; -import { - getRemoteDefaultTemplate, - getTemplateFormat -} from '../../../../action/src/templateHelpers'; +import { getRemoteDefaultTemplate, getTemplateFormat } from '../../../../action/src/templateHelpers'; import { Template } from '../../../../action/src/types'; -import {findGitRoot, findStoatConfigPath} from '../pathHelpers'; -import path from "path"; +import { findGitRoot, findStoatConfigPath } from '../pathHelpers'; +import path from 'path'; // supports reading the local template from a subdirectory const getLocalTemplate = (commentTemplatePath: string): Template => { @@ -21,11 +18,7 @@ const getLocalTemplate = (commentTemplatePath: string): Template => { }; // supports reading the local template from a subdirectory if necessary -const getTemplate = async ( - ghOwner: string, - ghRepo: string, - stoatConfig: StoatConfigSchema -): Promise