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()
|
||||
|
||||
useEffect(() => {
|
||||
;(async () => {
|
||||
// This is a workaround to keep prettier and eslint
|
||||
// from fighting over syntax
|
||||
async function prettierEslintPeaceDeal() {
|
||||
setMdxModule(await run(mdx, runtime))
|
||||
})()
|
||||
}
|
||||
prettierEslintPeaceDeal()
|
||||
}, [mdx])
|
||||
|
||||
/*
|
||||
|
|
|
@ -13,9 +13,12 @@ const TocWrapper = ({ toc }) => {
|
|||
const [mdxModule, setMdxModule] = useState()
|
||||
|
||||
useEffect(() => {
|
||||
;(async () => {
|
||||
// This is a workaround to keep prettier and eslint
|
||||
// from fighting over syntax
|
||||
async function prettierEslintPeaceDeal() {
|
||||
setMdxModule(await run(toc, runtime))
|
||||
})()
|
||||
}
|
||||
prettierEslintPeaceDeal()
|
||||
}, [toc])
|
||||
|
||||
// React component for MDX content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue