Build/Refactor: lint pre-commit hook and reformat repo to spec (#314)

* build/refactor: move lint/prettier packages to project root, install husky, add pre-commit hook

* refactor: reformat files

* build: put full eslintrc back with all rules
This commit is contained in:
Dan Orlando 2023-05-18 11:09:31 -07:00 committed by GitHub
parent 8d75b25104
commit 7fdc862042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
157 changed files with 4836 additions and 2403 deletions

View file

@ -34,7 +34,7 @@ export default function TextChat({ isSearchView = false }) {
// const bingStylesRef = useRef(null);
const [showBingToneSetting, setShowBingToneSetting] = useState(false);
const isNotAppendable = (latestMessage?.unfinished & !isSubmitting) || latestMessage?.error;
const isNotAppendable = latestMessage?.unfinished & !isSubmitting || latestMessage?.error;
// auto focus to input, when enter a conversation.
useEffect(() => {
@ -64,12 +64,12 @@ export default function TextChat({ isSearchView = false }) {
setText('');
};
const handleStopGenerating = e => {
const handleStopGenerating = (e) => {
e.preventDefault();
stopGenerating();
};
const handleKeyDown = e => {
const handleKeyDown = (e) => {
if (e.key === 'Enter' && isSubmitting) {
return;
}
@ -83,7 +83,7 @@ export default function TextChat({ isSearchView = false }) {
}
};
const handleKeyUp = e => {
const handleKeyUp = (e) => {
if (e.keyCode === 8 && e.target.value.trim() === '') {
setText(e.target.value);
}
@ -105,7 +105,7 @@ export default function TextChat({ isSearchView = false }) {
isComposing.current = false;
};
const changeHandler = e => {
const changeHandler = (e) => {
const { value } = e.target;
setText(value);