Skip to content
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

Enable noUnusedImports rule in Biome #4656

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion frontend/app/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"noUndeclaredDependencies": "off",
"noUndeclaredVariables": "off",
"noUnusedFunctionParameters": "off",
"noUnusedImports": "off",
"noUnusedImports": "error",
"noUnusedVariables": "off",
"useExhaustiveDependencies": "off",
"useHookAtTopLevel": "off",
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/components/branch-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { branchesState, currentBranchAtom } from "@/state/atoms/branches.atom";
import { branchesToSelectOptions } from "@/utils/branches";
import { Icon } from "@iconify-icon/react";
import { useAtomValue } from "jotai/index";
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { StringParam, useQueryParam } from "use-query-params";

import { ComboboxItem } from "@/components/ui/combobox";
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/components/conversations/add-comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isRequired } from "@/components/form/utils/validation";
import { Form, FormRef, FormSubmit } from "@/components/ui/form";
import { useAuth } from "@/hooks/useAuth";
import { constructPath } from "@/utils/fetch";
import React, { forwardRef, ReactElement } from "react";
import { ReactElement, forwardRef } from "react";
import { useLocation } from "react-router-dom";

type CommentFormData = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/components/filters/filter-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Form, FormProps, FormRef, FormSubmit } from "@/components/ui/form";
import { Filter } from "@/hooks/useFilters";
import { IModelSchema } from "@/state/atoms/schema.atom";
import { classNames, isGeneric } from "@/utils/common";
import React, { forwardRef } from "react";
import { forwardRef } from "react";

export interface FilterFormProps extends FormProps {
schema: IModelSchema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { FormField, FormInput, FormMessage } from "@/components/ui/form";
import useFilters from "@/hooks/useFilters";
import { iGenericSchema, profilesAtom, schemaState } from "@/state/atoms/schema.atom";
import { useAtomValue } from "jotai/index";
import React, { useState } from "react";
import { useState } from "react";

export const FilterKindSelector = ({ genericSchema }: { genericSchema: iGenericSchema }) => {
const [activeFilters] = useFilters();
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/components/filters/filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import useFilters from "@/hooks/useFilters";
import usePagination from "@/hooks/usePagination";
import { IModelSchema } from "@/state/atoms/schema.atom";
import { Icon } from "@iconify-icon/react";
import React, { useState } from "react";
import { useState } from "react";

type FiltersProps = {
schema: IModelSchema;
Expand Down
1 change: 0 additions & 1 deletion frontend/app/src/components/form/branch-create-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { BRANCH_CREATE } from "@/graphql/mutations/branches/createBranch";
import { useMutation } from "@/hooks/useQuery";
import { branchesState } from "@/state/atoms/branches.atom";
import { useAtom } from "jotai";
import React from "react";
import { StringParam, useQueryParam } from "use-query-params";

type BranchFormData = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/components/form/dynamic-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { DynamicFieldProps, FormFieldValue } from "@/components/form/type";
import { Form, FormProps, FormRef, FormSubmit } from "@/components/ui/form";
import { SCHEMA_ATTRIBUTE_KIND } from "@/config/constants";
import { warnUnexpectedType } from "@/utils/common";
import React, { forwardRef } from "react";
import { forwardRef } from "react";

export interface DynamicFormProps extends Omit<FormProps, "onSubmit"> {
fields: Array<DynamicFieldProps>;
Expand Down
1 change: 0 additions & 1 deletion frontend/app/src/components/form/fields/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Tooltip } from "@/components/ui/tooltip";
import { classNames } from "@/utils/common";
import { getObjectDetailsUrl2 } from "@/utils/objects";
import { Icon } from "@iconify-icon/react";
import React from "react";
import { Link } from "react-router-dom";

export const InputUniqueTips = ({ className }: { className: string }) => (
Expand Down
1 change: 0 additions & 1 deletion frontend/app/src/components/form/fields/enum.field.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LabelFormField } from "@/components/form/fields/common";
import { DynamicEnumFieldProps, FormAttributeValue } from "@/components/form/type";
import { FormField, FormInput, FormMessage } from "@/components/ui/form";
import React from "react";

import { DEFAULT_FORM_FIELD_VALUE } from "@/components/form/constants";
import { updateFormFieldValue } from "@/components/form/utils/updateFormFieldValue";
Expand Down
1 change: 0 additions & 1 deletion frontend/app/src/components/form/fields/number.field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
} from "@/components/form/utils/updateFormFieldValue";
import { FormField, FormInput, FormMessage } from "@/components/ui/form";
import { Input, InputProps } from "@/components/ui/input";
import React from "react";

export interface NumberFieldProps
extends Omit<DynamicNumberFieldProps, "type">,
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/components/search/search-anywhere.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, ButtonProps, ButtonWithTooltip } from "@/components/buttons/button-primitive";
import { Button, ButtonProps } from "@/components/buttons/button-primitive";
import { Card } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import Kbd from "@/components/ui/kbd";
Expand Down
1 change: 0 additions & 1 deletion frontend/app/src/pages/branches/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import Content from "@/screens/layout/content";
import { branchesState } from "@/state/atoms/branches.atom";
import { constructPath } from "@/utils/fetch";
import { useAtomValue } from "jotai";
import React from "react";
import { Navigate, useParams } from "react-router-dom";
import { StringParam, useQueryParam } from "use-query-params";

Expand Down
1 change: 0 additions & 1 deletion frontend/app/src/screens/branches/branches-items.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DateDisplay } from "@/components/display/date-display";
import { Badge } from "@/components/ui/badge";
import { Tooltip } from "@/components/ui/tooltip";
import GET_BRANCHES from "@/graphql/queries/branches/getBranches";
import { useLazyQuery } from "@/hooks/useQuery";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { branchesState } from "@/state/atoms/branches.atom";
import { classNames } from "@/utils/common";
import { constructPath } from "@/utils/fetch";
import { useAtomValue } from "jotai";
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { Link, useNavigate } from "react-router-dom";

export default function BreadcrumbBranchSelector({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import BreadcrumbObjectSelector from "@/screens/layout/breadcrumb-navigation/ite
import BreadcrumbSchemaSelector from "@/screens/layout/breadcrumb-navigation/items/breadcrumb-schema-selector";
import { BreadcrumbItem } from "@/screens/layout/breadcrumb-navigation/type";
import { warnUnexpectedType } from "@/utils/common";
import React from "react";

export type BreadcrumbDynamicElementProps = BreadcrumbItem & {
isLast?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Spinner } from "@/components/ui/spinner";
import React from "react";

export default function BreadcrumbLoading() {
return <Spinner className="mx-4" />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import BreadcrumbLoading from "@/screens/layout/breadcrumb-navigation/items/brea
import { IModelSchema } from "@/state/atoms/schema.atom";
import { getObjectDetailsUrl2 } from "@/utils/objects";
import { NetworkStatus } from "@apollo/client";
import React from "react";

export default function BreadcrumbObjectSelector({
kind,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import BreadcrumbLoading from "@/screens/layout/breadcrumb-navigation/items/brea
import { breadcrumbActiveStyle } from "@/screens/layout/breadcrumb-navigation/style";
import { classNames } from "@/utils/common";
import { getObjectDetailsUrl2 } from "@/utils/objects";
import React from "react";

interface BreadcrumbSchemaSelectorProps {
kind: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { datetimeAtom } from "@/state/atoms/time.atom";
import { stringifyWithoutQuotes } from "@/utils/string";
import { gql } from "@apollo/client";
import { useAtomValue } from "jotai/index";
import React, { useState } from "react";
import { useState } from "react";
import { toast } from "react-toastify";

interface PcApproveButtonProps extends ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { datetimeAtom } from "@/state/atoms/time.atom";
import { stringifyWithoutQuotes } from "@/utils/string";
import { gql } from "@apollo/client";
import { useAtomValue } from "jotai/index";
import React, { useState } from "react";
import { useState } from "react";
import { toast } from "react-toastify";

interface PcCloseButtonProps extends ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { datetimeAtom } from "@/state/atoms/time.atom";
import { stringifyWithoutQuotes } from "@/utils/string";
import { gql } from "@apollo/client";
import { useAtomValue } from "jotai/index";
import React, { useState } from "react";
import { useState } from "react";
import { toast } from "react-toastify";

interface PcMergeButtonProps extends ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { constructPath } from "@/utils/fetch";
import { getProposedChangesStateBadgeType } from "@/utils/proposed-changes";
import { Icon } from "@iconify-icon/react";
import { useAtom } from "jotai";
import React, { HTMLAttributes } from "react";
import { HTMLAttributes } from "react";
import { useNavigate, useParams } from "react-router-dom";

export const ProposedChangeDetails = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { usePermission } from "@/hooks/usePermission";
import { useSchema } from "@/hooks/useSchema";
import { ProposedChangeEditForm } from "@/screens/proposed-changes/form/proposed-change-edit-form";
import { Icon } from "@iconify-icon/react";
import React, { useState } from "react";
import { useState } from "react";

export const ProposedChangeEditTrigger = ({
proposedChangesDetails,
Expand Down
1 change: 0 additions & 1 deletion frontend/app/src/screens/repository/repository-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { classNames } from "@/utils/common";
import { stringifyWithoutQuotes } from "@/utils/string";
import { gql } from "@apollo/client";
import { useAtomValue } from "jotai/index";
import React from "react";

const RepositoryForm = ({
onSuccess,
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/screens/role-management/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Pill } from "@/components/display/pill";
import SlideOver, { SlideOverTitle } from "@/components/display/slide-over";
import ObjectForm from "@/components/form/object-form";
import ModalDeleteObject from "@/components/modals/modal-delete-object";
import { Table, tRow, tRowValue } from "@/components/table/table";
import { Table, tRowValue } from "@/components/table/table";
import { Pagination } from "@/components/ui/pagination";
import { ACCOUNT_GENERIC_OBJECT, ACCOUNT_OBJECT } from "@/config/constants";
import graphqlClient from "@/graphql/graphqlClientApollo";
Expand Down
3 changes: 0 additions & 3 deletions frontend/app/tests/integrations/lib/badge.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference types="cypress" />

import React from "react";
import { BADGE_TYPES, Badge } from "../../../src/components/display/badge";

describe("Badge component", () => {
Expand Down
3 changes: 0 additions & 3 deletions frontend/app/tests/integrations/lib/button.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference types="cypress" />

import React from "react";
import { BUTTON_TYPES, Button } from "../../../src/components/buttons/button";

describe("Button component", () => {
Expand Down
3 changes: 0 additions & 3 deletions frontend/app/tests/integrations/lib/pill.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference types="cypress" />

import React from "react";
import { PILL_TYPES, Pill } from "../../../src/components/display/pill";

describe("Pill component", () => {
Expand Down
1 change: 0 additions & 1 deletion frontend/app/tests/integrations/screens/account.cy.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/// <reference types="cypress" />

import { MockedProvider } from "@apollo/client/testing";
import React from "react";
import { AccountMenu } from "../../../src/components/account-menu";
import { ACCESS_TOKEN_KEY } from "../../../src/config/localStorage";
import { AuthProvider } from "../../../src/hooks/useAuth";
Expand Down
1 change: 0 additions & 1 deletion frontend/app/tests/integrations/screens/app-init.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { MockedProvider } from "@apollo/client/testing";
import { mount } from "cypress/react18";
import React from "react";
import { App } from "../../../src/App";

describe("Config fetch", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { gql } from "@apollo/client";
import { MockedProvider } from "@apollo/client/testing";
import React from "react";
import { Route, Routes } from "react-router-dom";
import { Conversations } from "../../../src/screens/proposed-changes/conversations";
import { proposedChangedState } from "../../../src/state/atoms/proposedChanges.atom";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { gql } from "@apollo/client";
import { MockedProvider } from "@apollo/client/testing";
import React from "react";
import { Route, Routes } from "react-router-dom";
import { ObjectDetailsPage } from "../../../src/pages/objects/object-details";
import { genericsState, schemaState } from "../../../src/state/atoms/schema.atom";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { gql } from "@apollo/client";
import { MockedProvider } from "@apollo/client/testing";
import React from "react";
import { Route, Routes } from "react-router-dom";
import { ObjectDetailsPage } from "../../../src/pages/objects/object-details";
import { schemaState } from "../../../src/state/atoms/schema.atom";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/// <reference types="cypress" />

import { MockedProvider } from "@apollo/client/testing";
import React from "react";
import { Route, Routes } from "react-router-dom";
import { schemaState } from "../../../src/state/atoms/schema.atom";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { gql } from "@apollo/client";
import { MockedProvider } from "@apollo/client/testing";
import React from "react";
import { Route, Routes } from "react-router-dom";
import { ACCESS_TOKEN_KEY } from "../../../src/config/localStorage";
import { AuthProvider } from "../../../src/hooks/useAuth";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { gql } from "@apollo/client";
import { MockedProvider } from "@apollo/client/testing";
import React from "react";
import { Route, Routes } from "react-router-dom";
import { ObjectItemsPage } from "../../../src/pages/objects/object-items";
import { genericsState, schemaState } from "../../../src/state/atoms/schema.atom";
Expand Down
Loading