Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(website): update hash value if problem occurs due to ts version error#11292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
developer-bandi wants to merge3 commits intotypescript-eslint:main
base:main
Choose a base branch
Loading
fromdeveloper-bandi:website/tsversion-error
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionspackages/website/src/components/Playground.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,6 +152,7 @@ function Playground(): React.JSX.Element {
onMarkersChange={setMarkers}
onSelect={setPosition}
selectedRange={selectedRange}
setState={setState}
/>
</Panel>
<PanelResizeHandle className={styles.PanelResizeHandle} />
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@ import semverSatisfies from 'semver/functions/satisfies';
import type { createTypeScriptSandbox } from '../../vendor/sandbox';
import type { CreateLinter } from '../linter/createLinter';
import type { PlaygroundSystem } from '../linter/types';
import type { RuleDetails } from '../types';
import type {ConfigModel,RuleDetails } from '../types';
import type { CommonEditorProps } from './types';

import rootPackageJson from '../../../../../package.json';
Expand All@@ -23,6 +23,7 @@ export interface SandboxServicesProps {
ruleDetails: RuleDetails[],
tsVersions: readonly string[],
) => void;
readonly setState: (value: Partial<ConfigModel>) => void;
readonly ts: string;
}

Expand DownExpand Up@@ -140,6 +141,12 @@ export const useSandboxServices = (
})
.catch((err: unknown) => {
if (err instanceof Error) {
if (
err.message ===
'Could not get all the dependencies of sandbox set up!'
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldbergJun 16, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

[Refactor] A couple issues with the implementation as-is:

But, stepping back, I think this is too wide of a check.Any error rejection fromloadSandbox will runprops.setState({ ts: process.env.TS_VERSION }); Even if it wasn't a TS version error in the first place!

Requesting changes:

  • The reset ofts state should only happen if:
    a. The existingts version is an unsupported one
    b. The failure is specifically for thevs/editor/editor.main
  • Switch the return type ofloadSandbox to be something like a discriminated union, so the failure state is captured in the type system

) {
props.setState({ ts: process.env.TS_VERSION });
}
setServices(err);
} else {
setServices(new Error(String(err)));
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp