wip(shared): Brokering peace between prettier and eslint
This commit is contained in:
parent
ba76fdc2a7
commit
dfa26c2e35
2 changed files with 10 additions and 4 deletions
|
@ -21,9 +21,12 @@ const MdxWrapper = ({ mdx, app, t, components = {} }) => {
|
||||||
const [mdxModule, setMdxModule] = useState()
|
const [mdxModule, setMdxModule] = useState()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
;(async () => {
|
// This is a workaround to keep prettier and eslint
|
||||||
|
// from fighting over syntax
|
||||||
|
async function prettierEslintPeaceDeal() {
|
||||||
setMdxModule(await run(mdx, runtime))
|
setMdxModule(await run(mdx, runtime))
|
||||||
})()
|
}
|
||||||
|
prettierEslintPeaceDeal()
|
||||||
}, [mdx])
|
}, [mdx])
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -13,9 +13,12 @@ const TocWrapper = ({ toc }) => {
|
||||||
const [mdxModule, setMdxModule] = useState()
|
const [mdxModule, setMdxModule] = useState()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
;(async () => {
|
// This is a workaround to keep prettier and eslint
|
||||||
|
// from fighting over syntax
|
||||||
|
async function prettierEslintPeaceDeal() {
|
||||||
setMdxModule(await run(toc, runtime))
|
setMdxModule(await run(toc, runtime))
|
||||||
})()
|
}
|
||||||
|
prettierEslintPeaceDeal()
|
||||||
}, [toc])
|
}, [toc])
|
||||||
|
|
||||||
// React component for MDX content
|
// React component for MDX content
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue