Skip to content

Commit

Permalink
Merge pull request #2223 from trilitech/add-no-unused-paths-to-lint-r…
Browse files Browse the repository at this point in the history
…ules

Add import/no-useless-path-segments rule to eslint-config
  • Loading branch information
asiia-trilitech authored Dec 10, 2024
2 parents c543e32 + f1daa22 commit 45acebc
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/components/SendFlow/Beacon/BatchSignPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import {
import { FormProvider, useForm } from "react-hook-form";

import { Header } from "./Header";
import { useSignWithBeacon } from "./useSignWithBeacon";
import { useColor } from "../../../styles/useColor";
import { AddressTile } from "../../AddressTile/AddressTile";
import { JsValueWrap } from "../../JsValueWrap";
import { useSignWithBeacon } from "../Beacon/useSignWithBeacon";
import { SignButton } from "../SignButton";
import { SignPageFee } from "../SignPageFee";
import { type SdkSignPageProps } from "../utils";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/SendFlow/Beacon/BeaconSignPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { StakeSignPage } from "./StakeSignPage";
import { TezSignPage } from "./TezSignPage";
import { UndelegationSignPage } from "./UndelegationSignPage";
import { UnstakeSignPage } from "./UnstakeSignPage";
import { useSignWithBeacon } from "../Beacon/useSignWithBeacon";
import { useSignWithBeacon } from "./useSignWithBeacon";

export const SingleSignPage = (signProps: SdkSignPageProps) => {
const operationType = signProps.operation.operations[0].type;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/beacon/BeaconPeers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { parsePkh } from "@umami/tezos";
import capitalize from "lodash/capitalize";

import { CodeSandboxIcon, StubIcon as TrashIcon } from "../../assets/icons";
import { AddressPill } from "../../components/AddressPill/AddressPill";
import { useColor } from "../../styles/useColor";
import { AddressPill } from "../AddressPill/AddressPill";
import { EmptyMessage } from "../EmptyMessage";

/**
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/beacon/PermissionRequestModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import { capitalize } from "lodash";
import { FormProvider, useForm } from "react-hook-form";

import { CodeSandboxIcon } from "../../assets/icons";
import { OwnedImplicitAccountsAutocomplete } from "../../components/AddressAutocomplete";
import { useColor } from "../../styles/useColor";
import { OwnedImplicitAccountsAutocomplete } from "../AddressAutocomplete";
import { ModalCloseButton } from "../CloseButton";
import { JsValueWrap } from "../JsValueWrap";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/beacon/SignPayloadRequestModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import { WalletClient, useGetImplicitAccount } from "@umami/state";
import { useState } from "react";
import { FormProvider, useForm } from "react-hook-form";

import { SignButton } from "../../components/SendFlow/SignButton";
import { useColor } from "../../styles/useColor";
import { SignButton } from "../SendFlow/SignButton";

export const SignPayloadRequestModal = ({ request }: { request: SignPayloadRequestOutput }) => {
const { onClose } = useDynamicModalContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import { MAINNET, mockImplicitAddress } from "@umami/tezos";
import { CustomError } from "@umami/utils";

import { useHandleBeaconMessage } from "./useHandleBeaconMessage";
import { BatchSignPage } from "../../components/SendFlow/Beacon/BatchSignPage";
import { SingleSignPage } from "../../components/SendFlow/Beacon/BeaconSignPage";
import { act, dynamicModalContextMock, renderHook, screen, waitFor } from "../../testUtils";
import { BatchSignPage } from "../SendFlow/Beacon/BatchSignPage";
import { SingleSignPage } from "../SendFlow/Beacon/BeaconSignPage";
import { type SdkSignPageProps, type SignHeaderProps } from "../SendFlow/utils";

jest.mock("@umami/core", () => ({
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/beacon/useHandleBeaconMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { CustomError } from "@umami/utils";

import { PermissionRequestModal } from "./PermissionRequestModal";
import { SignPayloadRequestModal } from "./SignPayloadRequestModal";
import { BatchSignPage } from "../../components/SendFlow/Beacon/BatchSignPage";
import { SingleSignPage } from "../../components/SendFlow/Beacon/BeaconSignPage";
import { BatchSignPage } from "../SendFlow/Beacon/BatchSignPage";
import { SingleSignPage } from "../SendFlow/Beacon/BeaconSignPage";
import { type SdkSignPageProps, type SignHeaderProps } from "../SendFlow/utils";

/**
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ module.exports = {
"import/no-cycle": "warn",
"import/no-self-import": "warn",
"import/no-duplicates": ["warn", { "prefer-inline": true }],
"import/no-useless-path-segments": ["warn", { noUselessIndex: true, commonjs: true }],
"import/order": [
"warn",
{
Expand Down

1 comment on commit 45acebc

@github-actions
Copy link

Choose a reason for hiding this comment

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

Title Lines Statements Branches Functions
apps/desktop Coverage: 83%
83.74% (1778/2123) 79.58% (850/1068) 78.16% (451/577)
apps/web Coverage: 83%
83.74% (1778/2123) 79.58% (850/1068) 78.16% (451/577)
packages/components Coverage: 97%
97.51% (196/201) 95.91% (94/98) 88.13% (52/59)
packages/core Coverage: 81%
82.47% (207/251) 72.72% (88/121) 81.35% (48/59)
packages/crypto Coverage: 100%
100% (43/43) 90.9% (10/11) 100% (7/7)
packages/data-polling Coverage: 97%
95.27% (141/148) 87.5% (21/24) 92.85% (39/42)
packages/multisig Coverage: 98%
98.47% (129/131) 85.71% (18/21) 100% (36/36)
packages/social-auth Coverage: 100%
100% (21/21) 100% (11/11) 100% (3/3)
packages/state Coverage: 85%
84.76% (818/965) 80.86% (186/230) 78.59% (301/383)
packages/tezos Coverage: 89%
88.72% (118/133) 94.59% (35/37) 86.84% (33/38)
packages/tzkt Coverage: 89%
87.32% (62/71) 87.5% (14/16) 80.48% (33/41)

Please sign in to comment.