Fix .husky/pre-commit

This commit is contained in:
0x1eef 2023-10-28 10:59:18 -03:00
parent 365c27d273
commit b1d9be9806
2 changed files with 9 additions and 5 deletions

View file

@ -1,11 +1,12 @@
#!/usr/bin/env sh
pattern=".ts|.tsx|.js$"
git diff --cached --name-only | grep -q -E -e "${pattern}"
files=$(git --no-pager diff --cached --name-only | grep -E -e "${pattern}")
if [ "$?" = "0" ]; then
npm run prettier || exit 1
npm run eslint || exit 1
npm run prettier -- "${files}" || exit 1
npm run eslint -- "${files}" || exit 1
git add "${files}"
exit 0
else
exit 0
fi

View file

@ -54,7 +54,10 @@ function SurahStream({ node, recitations, locale, paused, t }: Props) {
}, [stream.length === 0]);
return (
<article ref={ref} className={classNames("invisible", "content", "theme", theme, locale)}>
<article
ref={ref}
className={classNames("invisible", "content", "theme", theme, locale)}
>
{readyToRender && (
<>
<header>