Skip to content

Last round of lint fixes #46

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Last round of lint fixes #46

merged 2 commits into from
Jan 23, 2025

Conversation

tstirrat15
Copy link
Contributor

Description

This is the last of the lint fixes.

Changes

  • Lint fixes. Will annotate.

Testing

Review. See that things pass.

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 8:18pm

Copy link
Contributor Author

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

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

See annotations

Comment on lines -16 to -20
/**
* withRouter, it specified, is the router to wrap the application with.
*/
withRouter?: any;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked at index.tsx and realized that this only ever has one value, so I got rid of the prop passing as unnecessary complexity.

return (
<Router>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This got lifted up, which means we could get rid of the props and this wrapping.

@@ -713,8 +702,10 @@ export function ThemedAppView(props: { datastore: DataStore }) {
return;
}

cookieService.setRelationshipsEditorType(type);
setRelationshipEditor(type);
if (type === 'grid' || type === 'code') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Narrowing

@@ -118,7 +118,7 @@ function InlinePlaygroundUI(props: { datastore: DataStore }) {
);

const handleChangeTab = (
event: React.ChangeEvent<{}>,
_event: React.ChangeEvent<object>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

MUI's types here are kinda jank. This satisfies the type without using {}, since we can't use HTMLElement here.

@@ -165,6 +165,7 @@ export function usePanelsCoordinator<L extends string>(props: PanelCoordinatorPr
}
} catch (e) {
// Do nothing.
console.error(e)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sending it to the console in case someone wants to look, which also silences an unused var lint error.

@tstirrat15 tstirrat15 merged commit 87a7b6e into main Jan 23, 2025
4 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants