Skip to content

Commit

Permalink
Merge pull request #1049 from gasolin/lint113
Browse files Browse the repository at this point in the history
warning fix and update prettier packages

- yarn lint from 37 warnings to 24 warnings
- update prettier related packages
  • Loading branch information
Shadowfiend authored Feb 27, 2022
2 parents 8a1afbf + 435fc3d commit aa765ce
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 102 deletions.
4 changes: 1 addition & 3 deletions background/redux-slices/utils/contract-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import browser from "webextension-polyfill"
import { Provider, Web3Provider } from "@ethersproject/providers"
import { INTERNAL_PORT_NAME } from "@tallyho/provider-bridge-shared"
import { Web3Provider } from "@ethersproject/providers"
import TallyWindowProvider from "@tallyho/window-provider"
import { Contract, ethers, ContractInterface } from "ethers"
import Emittery from "emittery"
Expand Down
1 change: 0 additions & 1 deletion background/services/enrichment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from "../../networks"
import { enrichAssetAmountWithDecimalValues } from "../../redux-slices/utils/asset-utils"

import { ETH } from "../../constants"
import { parseERC20Tx, parseLogsForERC20Transfers } from "../../lib/erc20"
import { sameEVMAddress } from "../../lib/utils"

Expand Down
1 change: 0 additions & 1 deletion background/tests/prices.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// It's necessary to have an object w/ the function on it so we can use spyOn
import * as ethers from "@ethersproject/web" // << THIS IS THE IMPORTANT TRICK
import { JSONSchemaType, ValidateFunction } from "ajv"

import logger from "../lib/logger"
import { BTC, ETH, FIAT_CURRENCIES, USD } from "../constants"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-airbnb-typescript": "^14.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.4.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"fork-ts-checker-webpack-plugin": "^6.3.2",
Expand All @@ -94,7 +94,7 @@
"npm": "^7.5.6",
"npm-run-all": "^4.1.5",
"patch-package": "^6.4.7",
"prettier": "^2.3.2",
"prettier": "^2.5.1",
"process": "^0.11.10",
"size-plugin": "^2.0.2",
"stream-browserify": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion ui/components/TabBar/TabBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement, useState } from "react"
import React, { ReactElement } from "react"

import { useLocation } from "react-router-dom"
import TabBarIcon from "./TabBarIcon"
Expand Down
2 changes: 1 addition & 1 deletion ui/components/TopMenu/TopMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function TopMenu(): ReactElement {
const currentAccount = useBackgroundSelector(selectCurrentAccount)

const initPermissionAndOrigin = useCallback(async () => {
const { url, favIconUrl, title } = await browser.tabs
const { url } = await browser.tabs
.query({
active: true,
lastFocusedWindow: true,
Expand Down
1 change: 0 additions & 1 deletion ui/components/Wallet/WalletActivityList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
import { ActivityItem } from "@tallyho/tally-background/redux-slices/activities"
import { useBackgroundDispatch, useBackgroundSelector } from "../../hooks"
import SharedSlideUpMenu from "../Shared/SharedSlideUpMenu"
import SharedLoadingSpinner from "../Shared/SharedLoadingSpinner"
import WalletActivityDetails from "./WalletActivityDetails"
import WalletActivityListItem from "./WalletActivityListItem"

Expand Down
2 changes: 1 addition & 1 deletion ui/pages/DAppConnectRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function DAppConnectRequest(): ReactElement {
const dispatch = useBackgroundDispatch()

useEffect(() => {
window.onbeforeunload = (ev) => {
window.onbeforeunload = () => {
if (typeof permission !== "undefined") {
dispatch(
denyOrRevokePermission({
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/Onboarding/OnboardingVerifySeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default function OnboardingVerifySeed(): ReactElement {
</div>
<div className="column dashes">- - - -</div>
<div className="column words">
{isSelected.slice(posOne, posTwo).map((item, index) => (
{isSelected.slice(posOne, posTwo).map((item) => (
<div className="button_spacing" key={item}>
<SharedButton
type="deemphasizedWhite"
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/Onboarding/OnboardingViewOnlyWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement, useCallback, useEffect, useState } from "react"
import React, { ReactElement, useCallback, useState } from "react"
import { Redirect } from "react-router-dom"
import { isAddress } from "@ethersproject/address"
import {
Expand Down
Loading

0 comments on commit aa765ce

Please sign in to comment.