-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix: remove unused imports and variables (part 1 — packages & non-web-core) #8751
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
Changes from 1 commit
566a8b5
000ce48
3e0edea
d63b9c2
f7d909b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,6 @@ import { | |
| CODE_COLORS, | ||
| LINK_COLORS, | ||
| MENTION_COLORS, | ||
| NEUTRAL_COLORS, | ||
| TEXT_COLORS, | ||
| } from "./colors"; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |
| * See the LICENSE file for details. | ||
| */ | ||
|
|
||
| import type { FC } from "react"; | ||
| import React from "react"; | ||
| // local components | ||
|
|
||
|
|
@@ -15,7 +14,6 @@ type TDeDupeButtonRoot = { | |
| label: string; | ||
| }; | ||
|
|
||
| export function DeDupeButtonRoot(props: TDeDupeButtonRoot) { | ||
| const { workspaceSlug, isDuplicateModalOpen, label, handleOnClick } = props; | ||
| export function DeDupeButtonRoot(_props: TDeDupeButtonRoot) { | ||
| return <></>; | ||
|
Comment on lines
+17
to
18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE='apps/web/ce/components/de-dupe/de-dupe-button.tsx'
echo "Relevant snippet:"
sed -n '7,19p' "$FILE"
echo
echo "React namespace usages in this file (expected: no matches):"
rg -n '\bReact\.' "$FILE" || trueRepository: makeplane/plane Length of output: 400 Remove the unused The component no longer uses the React namespace, and this file uses the modern JSX transform. The unused import on line 7 should be removed. ♻️ Proposed fix-import React from "react";
// local components🤖 Prompt for AI Agents |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,7 @@ export const IssueParentSelectRoot = observer(function IssueParentSelectRoot(pro | |
| await issueOperations.fetch(workspaceSlug, projectId, issueId, false); | ||
| if (_issueId) await fetchSubIssues(workspaceSlug, projectId, _issueId); | ||
| toggleParentIssueModal(null); | ||
| } catch (error) { | ||
| } catch (_error) { | ||
| console.error("something went wrong while fetching the issue"); | ||
| } | ||
|
Comment on lines
+50
to
52
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the caught error available for logging/reporting. These renames make both failure paths intentionally discard the exception object, so parent-link failures now only surface a generic message/toast with no stack or error details. Keep the binding typed as 🛠️ Suggested cleanup- } catch (_error) {
- console.error("something went wrong while fetching the issue");
+ } catch (error: unknown) {
+ console.error("something went wrong while updating the parent issue", error);
}
@@
- } catch (_error) {
+ } catch (error: unknown) {
+ console.error("something went wrong while removing the sub-issue", error);
setToast({
type: TOAST_TYPE.ERROR,
title: t("common.error.label"),
message: t("common.something_went_wrong"),
});
}As per coding guidelines, "Use try-catch with proper error types and log errors appropriately for error handling". Also applies to: 66-72 🤖 Prompt for AI Agents |
||
| }; | ||
|
|
@@ -63,7 +63,7 @@ export const IssueParentSelectRoot = observer(function IssueParentSelectRoot(pro | |
| await removeSubIssue(workspaceSlug, projectId, parentIssueId, issueId); | ||
| await fetchSubIssues(workspaceSlug, projectId, parentIssueId); | ||
| setSubIssueHelpers(parentIssueId, "issue_loader", issueId); | ||
| } catch (error) { | ||
| } catch (_error) { | ||
| setToast({ | ||
| type: TOAST_TYPE.ERROR, | ||
| title: t("common.error.label"), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.