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

@ -4,7 +4,7 @@ import rehypeKatex from 'rehype-katex';
import rehypeHighlight from 'rehype-highlight';
import remarkMath from 'remark-math';
import remarkGfm from 'remark-gfm';
import rehypeRaw from 'rehype-raw'
import rehypeRaw from 'rehype-raw';
import CodeBlock from './CodeBlock';
import { langSubset } from '~/utils/languages.mjs';
@ -19,7 +19,7 @@ const Content = React.memo(({ content }) => {
subset: langSubset
}
],
[rehypeRaw],
[rehypeRaw]
];
return (
@ -29,7 +29,7 @@ const Content = React.memo(({ content }) => {
linkTarget="_new"
components={{
code,
p,
p
// em,
}}
>
@ -46,17 +46,12 @@ const code = React.memo((props) => {
if (inline) {
return <code className={className}>{children}</code>;
} else {
return (
<CodeBlock
lang={lang || 'text'}
codeChildren={children}
/>
);
return <CodeBlock lang={lang || 'text'} codeChildren={children} />;
}
});
const p = React.memo((props) => {
return <p className="whitespace-pre-wrap mb-2">{props?.children}</p>;
return <p className="mb-2 whitespace-pre-wrap">{props?.children}</p>;
});
// const blinker = ({ node }) => {