Skip to content

Commit

Permalink
[Beta] Fix lint re-running every second (#4687)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored May 25, 2022
1 parent f1f545c commit 603c6c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions beta/src/components/MDX/Sandpack/CustomPreset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import {Preview} from './Preview';
import {CustomTheme} from './Themes';
import {useSandpackLint} from './useSandpackLint';

// Workaround for https://github.com/reactjs/reactjs.org/issues/4686#issuecomment-1137402613.
const emptyArray = [];

export function CustomPreset({
isSingleFile,
showDevTools,
Expand Down Expand Up @@ -65,6 +68,7 @@ export function CustomPreset({
showTabs={false}
showRunButton={false}
extensions={lintExtensions}
extensionsKeymap={emptyArray}
/>
<Preview
className="order-last xl:order-2"
Expand Down

0 comments on commit 603c6c3

Please sign in to comment.