Skip to content

Commit 2c46c19

Browse files
committed
Linting fixes
1 parent da4276d commit 2c46c19

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/docs-md/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"type-fest": "^4.41.0"
2727
},
2828
"dependencies": {
29+
"@codesandbox/sandpack-client": "^2.19.8",
2930
"@codesandbox/sandpack-react": "^2.20.0",
3031
"arg": "^5.0.2",
3132
"jotai": "^2.12.5",

packages/docs-md/src/assets/TryItNow/hooks/useTranspiledCode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const getTranspiledCode = (client: SandpackClient): string | null => {
1818
const tModule = bundlerState.transpiledModules["/index.tsx:"];
1919

2020
return tModule?.source?.compiledCode ?? null;
21-
}
21+
};
2222

2323
/**
2424
* Returns the evaluated and transpiled code from the sandpack client whenever it is evaluating code.

packages/docs-md/src/assets/TryItNow/index.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import type {
22
SandpackOptions,
3-
SandpackSetup} from "@codesandbox/sandpack-react";
3+
SandpackSetup,
4+
} from "@codesandbox/sandpack-react";
45
import {
56
SandpackCodeEditor,
67
SandpackConsole,
78
SandpackLayout,
89
SandpackPreview,
9-
SandpackProvider
10+
SandpackProvider,
1011
} from "@codesandbox/sandpack-react";
1112
import { useAtomValue } from "jotai";
1213
import { Fragment } from "react";
@@ -15,9 +16,9 @@ import { CodeEditor } from "./CodeEditor/index.tsx";
1516
import { dependenciesAtom, lastEditorValueAtom } from "./state/index.ts";
1617
import { styles } from "./styles.ts";
1718

18-
export type DependencyName = string;
19-
export type DependencyVersion = string;
20-
export type Dependencies = Record<DependencyName, DependencyVersion>;
19+
type DependencyName = string;
20+
type DependencyVersion = string;
21+
type Dependencies = Record<DependencyName, DependencyVersion>;
2122

2223
export type TryItNowProps = {
2324
/**
@@ -38,8 +39,8 @@ export type TryItNowProps = {
3839
* custom container.
3940
*/
4041
disableContainer?: boolean;
41-
sandpackOptions?: SandpackOptions;
42-
sandpackSetupOptions?: SandpackSetup;
42+
sandpackOptions?: Partial<SandpackOptions>;
43+
sandpackSetupOptions?: Partial<SandpackSetup>;
4344
/**
4445
* Experimental: When enabled, the editor will automatically
4546
* scan for external dependencies from npm as the user adds them
@@ -72,7 +73,7 @@ export const TryItNow = ({
7273
autorun: false,
7374
activeFile: "index.tsx",
7475
...sandpackOptions,
75-
} as SandpackOptions}
76+
}}
7677
template="vanilla-ts"
7778
files={{
7879
"index.tsx": {

packages/docs-md/src/generator/mdx/renderer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { readdirSync, readFileSync } from "node:fs";
22
import { dirname, join, relative } from "node:path";
33
import { fileURLToPath } from "node:url";
44

5+
import type { TryItNowProps } from "../../assets/TryItNow/index.tsx";
56
import { assertNever } from "../../util/assertNever.ts";
67
import { getSettings } from "../settings.ts";
78

0 commit comments

Comments
 (0)