diff --git a/.eslintignore b/.eslintignore index e34cedf643..98ca688355 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ *.d.ts /src/graphql/data/__generated__/types-and-hooks.ts /src/graphql/thegraph/__generated__/types-and-hooks.ts +/src/schema/schema.graphql diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..cb37c8d9a4 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,7 @@ +/* eslint-env node */ + +require('@uniswap/eslint-config/load') + +module.exports = { + extends: '@uniswap/eslint-config/react', +} diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 3bb6768387..0000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module", - "ecmaFeatures": { - // Allows for the parsing of JSX - "jsx": true - } - }, - "settings": { - "react": { - "version": "detect" - }, - "import/parsers": { - "@typescript-eslint/parser": [".ts", ".tsx"] - }, - "import/resolver": { - "typescript": { - "alwaysTryTypes": true - } - } - }, - "ignorePatterns": [ - "src/types/v3", - "src/abis/types", - "src/locales/**/*.js", - "src/locales/**/en-US.po", - "node_modules", - "coverage", - "build", - "dist", - ".DS_Store", - ".env.local", - ".env.development.local", - ".env.test.local", - ".env.production.local", - ".idea/", - ".vscode/", - "package-lock.json", - "yarn.lock" - ], - "extends": [ - "react-app", - "plugin:react/recommended", - "plugin:@typescript-eslint/recommended", - "plugin:react-hooks/recommended", - "prettier/@typescript-eslint", - "plugin:prettier/recommended", - "plugin:import/typescript" - ], - "plugins": ["import", "simple-import-sort", "unused-imports"], - "rules": { - "import/no-unused-modules": [2, { "unusedExports": true }], - "unused-imports/no-unused-imports": "error", - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - "@typescript-eslint/explicit-function-return-type": "off", - "prettier/prettier": "error", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/ban-ts-ignore": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "react/react-in-jsx-scope": "off", - "react/jsx-curly-brace-presence": ["error", { "props": "never", "children": "never" }], - "object-shorthand": ["error", "always"], - "no-restricted-imports": [ - "error", - { - "paths": [ - { - "name": "ethers", - "message": "Please import from '@ethersproject/module' directly to support tree-shaking." - }, - { - "name": "styled-components", - "message": "Please import from styled-components/macro." - }, - { - "name": "@lingui/macro", - "importNames": ["t"], - "message": "Please use instead of t." - } - ], - "patterns": [ - { - "group": ["**/dist"], - "message": "Do not import from dist/ - this is an implementation detail, and breaks tree-shaking." - }, - { - "group": ["!styled-components/macro"] - } - ] - } - ], - "@typescript-eslint/no-restricted-imports": [ - "error", - { - "paths": [ - { - "name": "@ethersproject/providers", - "message": "Please only use Providers instantiated in constants/providers to improve traceability.", - "allowTypeImports": true - } - ] - } - ] - } -} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 40710857f5..0000000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -/src/schema/schema.graphql \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 31ba22d843..0000000000 --- a/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "semi": false, - "singleQuote": true, - "printWidth": 120 -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..a99e2432b2 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint" + ], + "unwantedRecommendations": [] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index bff658ad78..1107045fbf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,15 +5,12 @@ "editor.formatOnSaveMode": "file", "editor.tabCompletion": "on", "editor.tabSize": 2, - "editor.formatOnSave": true, + "editor.formatOnSave": false, "editor.inlineSuggest.enabled": true, "editor.codeActionsOnSave": { "source.fixAll": true }, "files.eol": "\n", "eslint.enable": true, - "eslint.debug": true, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - } + "eslint.debug": true } diff --git a/apollo-codegen.ts b/apollo-codegen.ts index 43b1fe1ca3..ccc36e913d 100644 --- a/apollo-codegen.ts +++ b/apollo-codegen.ts @@ -1,3 +1,5 @@ +/* eslint-env node */ + import type { CodegenConfig } from '@graphql-codegen/cli' // Generates TS objects from the schemas returned by graphql queries diff --git a/apollo-codegen_thegraph.ts b/apollo-codegen_thegraph.ts index 085f64d95b..677a6bd24c 100644 --- a/apollo-codegen_thegraph.ts +++ b/apollo-codegen_thegraph.ts @@ -1,3 +1,5 @@ +/* eslint-env node */ + import type { CodegenConfig } from '@graphql-codegen/cli' // Generates TS objects from the schemas returned by graphql queries diff --git a/babel-plugin-macros.config.js b/babel-plugin-macros.config.js index 6d1fae318a..5f65e606c0 100644 --- a/babel-plugin-macros.config.js +++ b/babel-plugin-macros.config.js @@ -1,3 +1,5 @@ +/* eslint-env node */ + const isDev = process.env.NODE_ENV === 'development' module.exports = { diff --git a/cypress/release.ts b/cypress/release.ts index 1b8134739d..f639f6587c 100644 --- a/cypress/release.ts +++ b/cypress/release.ts @@ -8,7 +8,8 @@ describe( }, () => { it('loads swap page', () => { - // We *must* wait in order to space out the retry attempts. + // TODO: We *must* wait in order to space out the retry attempts. Find a better way to do this. + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(ONE_MINUTE) .visit('/', { retryOnStatusCodeFailure: true, diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index fb78dd23df..327c10e458 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -85,8 +85,7 @@ beforeEach(() => { }) }) -Cypress.on('uncaught:exception', (_err, _runnable) => { - // returning false here prevents Cypress from - // failing the test +Cypress.on('uncaught:exception', () => { + // returning false here prevents Cypress from failing the test return false }) diff --git a/cypress/utils/graphql-test-utils.ts b/cypress/utils/graphql-test-utils.ts index f6c3ed6375..b5b2039834 100644 --- a/cypress/utils/graphql-test-utils.ts +++ b/cypress/utils/graphql-test-utils.ts @@ -1,7 +1,7 @@ // Utility to match GraphQL mutation based on the query name export const hasQuery = (req: any, queryName: string) => { const { body } = req - return body.hasOwnProperty('query') && body.query.includes(queryName) + return Object.prototype.hasOwnProperty.call(body, 'query') && body.query.includes(queryName) } // Alias query if queryName matches diff --git a/fetch-schema.js b/fetch-schema.js index 0bfdc239a1..229ea8428d 100644 --- a/fetch-schema.js +++ b/fetch-schema.js @@ -1,9 +1,10 @@ -/* eslint-disable */ +/* eslint-env node */ + require('dotenv').config({ path: '.env.production' }) + const { exec } = require('child_process') const dataConfig = require('./graphql.config') const thegraphConfig = require('./graphql_thegraph.config') -/* eslint-enable */ function fetchSchema(url, outputFile) { exec( diff --git a/graphql.config.js b/graphql.config.js index 240d3a7b18..784486127a 100644 --- a/graphql.config.js +++ b/graphql.config.js @@ -1,3 +1,5 @@ +/* eslint-env node */ + module.exports = { src: './src', language: 'typescript', diff --git a/graphql_thegraph.config.js b/graphql_thegraph.config.js index b8564f0816..29ce5dbe9f 100644 --- a/graphql_thegraph.config.js +++ b/graphql_thegraph.config.js @@ -1,4 +1,5 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires +/* eslint-env node */ + const defaultConfig = require('./graphql.config') module.exports = { diff --git a/package.json b/package.json index 522ad109d9..2cdc5832f1 100644 --- a/package.json +++ b/package.json @@ -90,22 +90,12 @@ "@types/ua-parser-js": "^0.7.35", "@types/uuid": "^8.3.4", "@types/wcag-contrast": "^3.0.0", - "@typescript-eslint/eslint-plugin": "^4", - "@typescript-eslint/parser": "^4", + "@uniswap/eslint-config": "^1.1.1", "@vanilla-extract/babel-plugin": "^1.1.7", "@vanilla-extract/webpack-plugin": "^2.1.11", "cypress": "^10.3.1", "env-cmd": "^10.1.0", "eslint": "^7.11.0", - "eslint-config-prettier": "^6.11.0", - "eslint-import-resolver-typescript": "^3.5.2", - "eslint-plugin-better-styled-components": "^1.1.2", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-prettier": "^3.1.3", - "eslint-plugin-react": "^7.21.5", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-simple-import-sort": "^7.0.0", - "eslint-plugin-unused-imports": "^2.0.0", "jest-styled-components": "^7.0.8", "ms.macro": "^2.0.0", "patch-package": "^6.4.7", diff --git a/prei18n-extract.js b/prei18n-extract.js index 15c8ce613d..d27248ba53 100644 --- a/prei18n-extract.js +++ b/prei18n-extract.js @@ -1,4 +1,5 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires +/* eslint-env node */ + const { exec } = require('child_process') const isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE) diff --git a/src/components/AccountDetails/TransactionSummary.tsx b/src/components/AccountDetails/TransactionSummary.tsx index 981e055155..924329f3b8 100644 --- a/src/components/AccountDetails/TransactionSummary.tsx +++ b/src/components/AccountDetails/TransactionSummary.tsx @@ -14,18 +14,15 @@ import { CollectFeesTransactionInfo, CreateV3PoolTransactionInfo, DelegateTransactionInfo, - DepositLiquidityStakingTransactionInfo, ExactInputSwapTransactionInfo, ExactOutputSwapTransactionInfo, ExecuteTransactionInfo, MigrateV2LiquidityToV3TransactionInfo, QueueTransactionInfo, RemoveLiquidityV3TransactionInfo, - SubmitProposalTransactionInfo, TransactionInfo, TransactionType, VoteTransactionInfo, - WithdrawLiquidityStakingTransactionInfo, WrapTransactionInfo, } from '../../state/transactions/types' @@ -83,7 +80,7 @@ function ClaimSummary({ info: { recipient, uniAmountRaw } }: { info: ClaimTransa ) } -function SubmitProposalTransactionSummary(_: { info: SubmitProposalTransactionInfo }) { +function SubmitProposalTransactionSummary() { return Submit new proposal } @@ -175,13 +172,13 @@ function WrapSummary({ info: { chainId, currencyAmountRaw, unwrapped } }: { info } } -function DepositLiquidityStakingSummary(_: { info: DepositLiquidityStakingTransactionInfo }) { +function DepositLiquidityStakingSummary() { // not worth rendering the tokens since you can should no longer deposit liquidity in the staking contracts // todo: deprecate and delete the code paths that allow this, show user more information return Deposit liquidity } -function WithdrawLiquidityStakingSummary(_: { info: WithdrawLiquidityStakingTransactionInfo }) { +function WithdrawLiquidityStakingSummary() { return Withdraw deposited liquidity } @@ -319,10 +316,10 @@ export function TransactionSummary({ info }: { info: TransactionInfo }) { return case TransactionType.DEPOSIT_LIQUIDITY_STAKING: - return + return case TransactionType.WITHDRAW_LIQUIDITY_STAKING: - return + return case TransactionType.SWAP: return @@ -358,6 +355,6 @@ export function TransactionSummary({ info }: { info: TransactionInfo }) { return case TransactionType.SUBMIT_PROPOSAL: - return + return } } diff --git a/src/components/AccountDetailsV2/LogoView.tsx b/src/components/AccountDetailsV2/LogoView.tsx index 8a5ec873a9..ac11868642 100644 --- a/src/components/AccountDetailsV2/LogoView.tsx +++ b/src/components/AccountDetailsV2/LogoView.tsx @@ -39,26 +39,32 @@ const getCurrency = ({ info, chainId }: { info: TransactionInfo; chainId: number switch (info.type) { case TransactionType.ADD_LIQUIDITY_V3_POOL: case TransactionType.REMOVE_LIQUIDITY_V3: - case TransactionType.CREATE_V3_POOL: + case TransactionType.CREATE_V3_POOL: { const { baseCurrencyId, quoteCurrencyId } = info return { currencyId0: baseCurrencyId, currencyId1: quoteCurrencyId } - case TransactionType.SWAP: + } + case TransactionType.SWAP: { const { inputCurrencyId, outputCurrencyId } = info return { currencyId0: inputCurrencyId, currencyId1: outputCurrencyId } - case TransactionType.WRAP: + } + case TransactionType.WRAP: { const { unwrapped } = info const native = info.chainId ? nativeOnChain(info.chainId) : undefined const base = 'ETH' const wrappedCurrency = native?.wrapped.address ?? 'WETH' return { currencyId0: unwrapped ? wrappedCurrency : base, currencyId1: unwrapped ? base : wrappedCurrency } - case TransactionType.COLLECT_FEES: + } + case TransactionType.COLLECT_FEES: { const { currencyId0, currencyId1 } = info return { currencyId0, currencyId1 } - case TransactionType.APPROVAL: + } + case TransactionType.APPROVAL: { return { currencyId0: info.tokenAddress, currencyId1: undefined } - case TransactionType.CLAIM: + } + case TransactionType.CLAIM: { const uniAddress = chainId ? UNI_ADDRESS[chainId] : undefined return { currencyId0: uniAddress, currencyId1: undefined } + } default: return { currencyId0: undefined, currencyId1: undefined } } diff --git a/src/components/FeatureFlagModal/FeatureFlagModal.tsx b/src/components/FeatureFlagModal/FeatureFlagModal.tsx index 7a95686dd4..44936f32ed 100644 --- a/src/components/FeatureFlagModal/FeatureFlagModal.tsx +++ b/src/components/FeatureFlagModal/FeatureFlagModal.tsx @@ -164,7 +164,7 @@ function FeatureFlagGroup({ name, children }: PropsWithChildren<{ name: string } ) } -function FeatureFlagOption({ variant, featureFlag, value, label }: FeatureFlagProps) { +function FeatureFlagOption({ variant, featureFlag, label }: FeatureFlagProps) { const updateFlag = useUpdateFlag() const [count, setCount] = useState(0) const featureFlags = useAtomValue(featureFlagSettings) diff --git a/src/components/FiatOnrampModal/index.tsx b/src/components/FiatOnrampModal/index.tsx index 538e5f6217..7c4965f46c 100644 --- a/src/components/FiatOnrampModal/index.tsx +++ b/src/components/FiatOnrampModal/index.tsx @@ -67,7 +67,7 @@ const MOONPAY_SUPPORTED_CURRENCY_CODES = [ export default function FiatOnrampModal() { const { account } = useWeb3React() const theme = useTheme() - const closeModal = useCloseModal(ApplicationModal.FIAT_ONRAMP) + const closeModal = useCloseModal() const fiatOnrampModalOpen = useModalIsOpen(ApplicationModal.FIAT_ONRAMP) const [signedIframeUrl, setSignedIframeUrl] = useState(null) diff --git a/src/components/NavigationTabs/index.tsx b/src/components/NavigationTabs/index.tsx index 3b2f908f84..d0934672c3 100644 --- a/src/components/NavigationTabs/index.tsx +++ b/src/components/NavigationTabs/index.tsx @@ -76,7 +76,7 @@ export function AddRemoveTabs({ // detect if back should redirect to v3 or v2 pool page const poolLink = location.pathname.includes('add/v2') ? '/pool/v2' - : '/pool' + (!!positionID ? `/${positionID.toString()}` : '') + : '/pool' + (positionID ? `/${positionID.toString()}` : '') return ( diff --git a/src/components/Toggle/index.tsx b/src/components/Toggle/index.tsx index ab371b7a0c..c4b8ad06be 100644 --- a/src/components/Toggle/index.tsx +++ b/src/components/Toggle/index.tsx @@ -51,7 +51,7 @@ const ToggleElement = styled.span<{ isActive?: boolean; bgColor?: string; isInit ${({ isActive, isInitialToggleLoad }) => (isInitialToggleLoad ? 'none' : isActive ? turnOnToggle : turnOffToggle)} ease-in; background: ${({ theme, bgColor, isActive }) => - isActive ? bgColor ?? theme.accentAction : !!bgColor ? theme.deprecated_bg4 : theme.textTertiary}; + isActive ? bgColor ?? theme.accentAction : bgColor ? theme.deprecated_bg4 : theme.textTertiary}; border-radius: 50%; height: 24px; :hover { diff --git a/src/components/Tokens/TokenDetails/Skeleton.tsx b/src/components/Tokens/TokenDetails/Skeleton.tsx index 531a2eb0e2..5d7596b29b 100644 --- a/src/components/Tokens/TokenDetails/Skeleton.tsx +++ b/src/components/Tokens/TokenDetails/Skeleton.tsx @@ -222,7 +222,7 @@ export default function TokenDetailsSkeleton() { const { chainName } = useParams<{ chainName?: string }>() return ( - + Tokens diff --git a/src/components/Tokens/TokenDetails/StatsSection.tsx b/src/components/Tokens/TokenDetails/StatsSection.tsx index ee78e8e03b..57a406b33d 100644 --- a/src/components/Tokens/TokenDetails/StatsSection.tsx +++ b/src/components/Tokens/TokenDetails/StatsSection.tsx @@ -51,24 +51,13 @@ export const StatsWrapper = styled.div` type NumericStat = number | undefined | null -function Stat({ - value, - title, - description, - isPrice = false, -}: { - value: NumericStat - title: ReactNode - description?: ReactNode - isPrice?: boolean -}) { +function Stat({ value, title, description }: { value: NumericStat; title: ReactNode; description?: ReactNode }) { return ( {title} {description && } - {formatNumber(value, NumberType.FiatTokenStats)} ) @@ -106,8 +95,8 @@ export default function StatsSection(props: StatsSectionProps) { /> - 52W low} isPrice={true} /> - 52W high} isPrice={true} /> + 52W low} /> + 52W high} /> diff --git a/src/components/WalletDropdown/AuthenticatedHeader.tsx b/src/components/WalletDropdown/AuthenticatedHeader.tsx index 86ebd5ba05..389b06f842 100644 --- a/src/components/WalletDropdown/AuthenticatedHeader.tsx +++ b/src/components/WalletDropdown/AuthenticatedHeader.tsx @@ -192,7 +192,7 @@ const AuthenticatedHeader = () => { explorer, } = getChainInfoOrDefault(chainId ? chainId : SupportedChainId.MAINNET) const navigate = useNavigate() - const closeModal = useCloseModal(ApplicationModal.WALLET_DROPDOWN) + const closeModal = useCloseModal() const setSellPageState = useProfilePageState((state) => state.setProfilePageState) const resetSellAssets = useSellAsset((state) => state.reset) const clearCollectionFilters = useWalletCollections((state) => state.clearCollectionFilters) diff --git a/src/components/WalletModal/index.test.tsx b/src/components/WalletModal/index.test.tsx index 1d75178408..5ae19bf9c5 100644 --- a/src/components/WalletModal/index.test.tsx +++ b/src/components/WalletModal/index.test.tsx @@ -1,6 +1,4 @@ -import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core' import * as connectionUtils from 'connection/utils' -import { ApplicationModal } from 'state/application/reducer' import { nativeOnChain } from '../../constants/tokens' import { render, screen } from '../../test-utils' @@ -20,7 +18,7 @@ jest.mock('utils/userAgent', () => ({ jest.mock('.../../state/application/hooks', () => { return { - useModalIsOpen: (_modal: ApplicationModal) => true, + useModalIsOpen: () => true, useToggleWalletModal: () => { return }, @@ -29,7 +27,7 @@ jest.mock('.../../state/application/hooks', () => { jest.mock('hooks/useStablecoinPrice', () => { return { - useStablecoinValue: (_currencyAmount: CurrencyAmount | undefined | null) => { + useStablecoinValue: () => { return }, } @@ -38,10 +36,10 @@ jest.mock('hooks/useStablecoinPrice', () => { jest.mock('lib/hooks/useCurrencyBalance', () => { return { __esModule: true, - default: (account?: string, currency?: Currency) => { + default: () => { return }, - useTokenBalance: (account?: string, token?: Token) => { + useTokenBalance: () => { return }, } diff --git a/src/components/Web3Status/index.tsx b/src/components/Web3Status/index.tsx index f2e2429b8b..22fbf126c2 100644 --- a/src/components/Web3Status/index.tsx +++ b/src/components/Web3Status/index.tsx @@ -300,7 +300,7 @@ export default function Web3Status() { const allTransactions = useAllTransactions() const ref = useRef(null) const walletRef = useRef(null) - const closeModal = useCloseModal(ApplicationModal.WALLET_DROPDOWN) + const closeModal = useCloseModal() const isOpen = useModalIsOpen(ApplicationModal.WALLET_DROPDOWN) useOnClickOutside(ref, isOpen ? closeModal : undefined, [walletRef]) diff --git a/src/constants/chains.test.ts b/src/constants/chains.test.ts index 6b6f32d5f1..6880411754 100644 --- a/src/constants/chains.test.ts +++ b/src/constants/chains.test.ts @@ -3,9 +3,11 @@ import { ALL_SUPPORTED_CHAIN_IDS, SupportedChainId } from './chains' describe('chains', () => { describe('ALL_SUPPORTED_CHAIN_IDS', () => { it('contains all the values in the SupportedChainId enum', () => { - Object.values(SupportedChainId).forEach((chainId) => { - if (typeof chainId === 'number') expect(ALL_SUPPORTED_CHAIN_IDS.includes(chainId as number)).toBeTruthy() - }) + Object.values(SupportedChainId) + .filter((chainId) => typeof chainId === 'number') + .forEach((chainId) => { + expect(ALL_SUPPORTED_CHAIN_IDS.includes(chainId as number)).toBeTruthy() + }) }) it('contains no duplicates', () => { diff --git a/src/hooks/useAutoSlippageTolerance.ts b/src/hooks/useAutoSlippageTolerance.ts index 612a56bc1d..f7865fc739 100644 --- a/src/hooks/useAutoSlippageTolerance.ts +++ b/src/hooks/useAutoSlippageTolerance.ts @@ -36,7 +36,7 @@ const V2_SWAP_HOP_GAS_ESTIMATE = 50_000 * https://github.com/Uniswap/smart-order-router/blob/main/src/routers/alpha-router/gas-models/v2/v2-heuristic-gas-model.ts */ function guesstimateGas(trade: Trade | undefined): number | undefined { - if (!!trade) { + if (trade) { let gas = 0 for (const { route } of trade.swaps) { if (route.protocol === Protocol.V2) { diff --git a/src/hooks/useColor.ts b/src/hooks/useColor.ts index 229732248d..160fbb6267 100644 --- a/src/hooks/useColor.ts +++ b/src/hooks/useColor.ts @@ -1,3 +1,4 @@ +import * as Sentry from '@sentry/react' import { Token } from '@uniswap/sdk-core' import { SupportedChainId } from 'constants/chains' import uriToHttp from 'lib/utils/uriToHttp' @@ -37,7 +38,9 @@ async function getColorFromToken(token: Token): Promise { try { logoURI = URIForEthToken(address) return await getColorFromUriPath(logoURI) - } catch (e) {} + } catch (error) { + Sentry.captureMessage(error.toString()) + } } return null diff --git a/src/hooks/useIsWindowVisible.ts b/src/hooks/useIsWindowVisible.ts index b1c08ccc48..b5c3d98ec4 100644 --- a/src/hooks/useIsWindowVisible.ts +++ b/src/hooks/useIsWindowVisible.ts @@ -19,7 +19,7 @@ export default function useIsWindowVisible(): boolean { useEffect(() => { if (!isVisibilityStateSupported()) return undefined - setFocused((focused) => isWindowVisible()) + setFocused(() => isWindowVisible()) document.addEventListener('visibilitychange', listener) return () => { diff --git a/src/hooks/useSyncChainQuery.ts b/src/hooks/useSyncChainQuery.ts index d08b510dce..9eae861766 100644 --- a/src/hooks/useSyncChainQuery.ts +++ b/src/hooks/useSyncChainQuery.ts @@ -9,7 +9,7 @@ import usePrevious from './usePrevious' import useSelectChain from './useSelectChain' function getChainIdFromName(name: string) { - const entry = Object.entries(CHAIN_IDS_TO_NAMES).find(([_, n]) => n === name) + const entry = Object.entries(CHAIN_IDS_TO_NAMES).find(([, n]) => n === name) const chainId = entry?.[0] return chainId ? parseInt(chainId) : undefined } diff --git a/src/index.tsx b/src/index.tsx index d4b1997780..e0772920e8 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -29,7 +29,7 @@ import UserUpdater from './state/user/updater' import ThemeProvider, { ThemedGlobalStyle } from './theme' import RadialGradientByChainUpdater from './theme/components/RadialGradientByChainUpdater' -if (!!window.ethereum) { +if (window.ethereum) { window.ethereum.autoRefreshOnNetworkChange = false } diff --git a/src/lib/hooks/useInterval.test.tsx b/src/lib/hooks/useInterval.test.tsx index 8fa1b7fe4b..e7c99a7f8d 100644 --- a/src/lib/hooks/useInterval.test.tsx +++ b/src/lib/hooks/useInterval.test.tsx @@ -11,30 +11,30 @@ describe('useInterval', () => { }) describe('with a synchronous function', () => { - it('it runs on an interval', () => { + it('runs on an interval', () => { jest.useFakeTimers() renderHook(() => useInterval(spy, 100)) expect(spy).toHaveBeenCalledTimes(1) - jest.runTimersToTime(100) + jest.advanceTimersByTime(100) expect(spy).toHaveBeenCalledTimes(2) }) }) describe('with an async funtion', () => { - it('it runs on an interval exclusive of fn resolving', async () => { + it('runs on an interval exclusive of fn resolving', async () => { jest.useFakeTimers() spy.mockImplementation(() => Promise.resolve(undefined)) renderHook(() => useInterval(spy, 100)) expect(spy).toHaveBeenCalledTimes(1) - jest.runTimersToTime(100) + jest.advanceTimersByTime(100) expect(spy).toHaveBeenCalledTimes(1) await spy.mock.results[0].value - jest.runTimersToTime(100) + jest.advanceTimersByTime(100) expect(spy).toHaveBeenCalledTimes(2) }) }) diff --git a/src/lib/hooks/useTokenList/fetchTokenList.test.ts b/src/lib/hooks/useTokenList/fetchTokenList.test.ts index ed15beda21..d6c6268141 100644 --- a/src/lib/hooks/useTokenList/fetchTokenList.test.ts +++ b/src/lib/hooks/useTokenList/fetchTokenList.test.ts @@ -5,7 +5,7 @@ describe.skip('fetchTokenList', () => { it('throws on an invalid list url', async () => { const url = 'https://example.com' - await expect(fetchTokenList(url, resolver)).rejects.toThrowError(`failed to fetch list: ${url}`) + await expect(fetchTokenList(url, resolver)).rejects.toThrow(`failed to fetch list: ${url}`) expect(resolver).not.toHaveBeenCalled() }) diff --git a/src/lib/i18n.tsx b/src/lib/i18n.tsx index 6d0b509830..0c701d663d 100644 --- a/src/lib/i18n.tsx +++ b/src/lib/i18n.tsx @@ -1,5 +1,6 @@ import { i18n } from '@lingui/core' import { I18nProvider } from '@lingui/react' +import * as Sentry from '@sentry/react' import { DEFAULT_LOCALE, SupportedLocale } from 'constants/locales' import { af, @@ -82,7 +83,9 @@ export async function dynamicActivate(locale: SupportedLocale) { const catalog = await import(`locales/${locale}.js`) // Bundlers will either export it as default or as a named export named default. i18n.load(locale, catalog.messages || catalog.default.messages) - } catch {} + } catch (error) { + Sentry.captureMessage(error.toString()) + } i18n.activate(locale) } diff --git a/src/lib/utils/formatLocaleNumber.test.ts b/src/lib/utils/formatLocaleNumber.test.ts index 8e73cc9c73..01563c99fd 100644 --- a/src/lib/utils/formatLocaleNumber.test.ts +++ b/src/lib/utils/formatLocaleNumber.test.ts @@ -15,6 +15,7 @@ function expectedOutput(l: SupportedLocale): string { case 'zh-TW': return `4,000,000.123` case 'fr-FR': + // eslint-disable-next-line no-irregular-whitespace return `4 000 000,123` case 'ar-SA': return `٤٬٠٠٠٬٠٠٠٫١٢٣` @@ -28,6 +29,7 @@ function expectedOutput(l: SupportedLocale): string { case 'ru-RU': case 'sv-SE': case 'uk-UA': + // eslint-disable-next-line no-irregular-whitespace return `4 000 000,123` case 'ca-ES': case 'da-DK': diff --git a/src/lib/utils/uriToHttp.ts b/src/lib/utils/uriToHttp.ts index c6db147a0e..c8d5f40664 100644 --- a/src/lib/utils/uriToHttp.ts +++ b/src/lib/utils/uriToHttp.ts @@ -11,15 +11,18 @@ export default function uriToHttp(uri: string): string[] { return [uri] case 'http': return ['https' + uri.substr(4), uri] - case 'ipfs': + case 'ipfs': { const hash = uri.match(/^ipfs:(\/\/)?(.*)$/i)?.[2] return [`https://cloudflare-ipfs.com/ipfs/${hash}/`, `https://ipfs.io/ipfs/${hash}/`] - case 'ipns': + } + case 'ipns': { const name = uri.match(/^ipns:(\/\/)?(.*)$/i)?.[2] return [`https://cloudflare-ipfs.com/ipns/${name}/`, `https://ipfs.io/ipns/${name}/`] - case 'ar': + } + case 'ar': { const tx = uri.match(/^ar:(\/\/)?(.*)$/i)?.[2] return [`https://arweave.net/${tx}`] + } default: return [] } diff --git a/src/nft/components/bag/profile/ListingButton.tsx b/src/nft/components/bag/profile/ListingButton.tsx index 4c01566b6a..053fec8fe6 100644 --- a/src/nft/components/bag/profile/ListingButton.tsx +++ b/src/nft/components/bag/profile/ListingButton.tsx @@ -186,7 +186,7 @@ export const ListingButton = ({ onClick, buttonText, showWarningOverride = false {warningMessage} - {!!disableListButton ? ( + {disableListButton ? ( diff --git a/src/nft/components/collection/ActivityCells.tsx b/src/nft/components/collection/ActivityCells.tsx index 811586925b..d864c99199 100644 --- a/src/nft/components/collection/ActivityCells.tsx +++ b/src/nft/components/collection/ActivityCells.tsx @@ -316,7 +316,7 @@ interface RankingProps { details?: boolean } -const Ranking = ({ details, rarity, collectionName, rarityVerified }: RankingProps) => { +const Ranking = ({ rarity, collectionName, rarityVerified }: RankingProps) => { const rarityProviderLogo = getRarityProviderLogo(rarity.source) return ( diff --git a/src/nft/components/collection/Card.tsx b/src/nft/components/collection/Card.tsx index d1f12ff990..0f6d89b695 100644 --- a/src/nft/components/collection/Card.tsx +++ b/src/nft/components/collection/Card.tsx @@ -577,7 +577,7 @@ interface ProfileNftDetailsProps { const ProfileNftDetails = ({ asset, hideDetails }: ProfileNftDetailsProps) => { const assetName = () => { if (!asset.name && !asset.tokenId) return - return !!asset.name ? asset.name : `#${asset.tokenId}` + return asset.name ? asset.name : `#${asset.tokenId}` } const shouldShowUserListedPrice = !asset.notForSale && asset.asset_contract.tokenType !== NftStandard.Erc1155 diff --git a/src/nft/components/collection/CollectionStats.tsx b/src/nft/components/collection/CollectionStats.tsx index 9c59c9a57f..4742436857 100644 --- a/src/nft/components/collection/CollectionStats.tsx +++ b/src/nft/components/collection/CollectionStats.tsx @@ -387,12 +387,11 @@ const StatsRow = ({ stats, isMobile, ...props }: { stats: GenieCollection; isMob {totalSupplyStr} ) : null} - {Boolean(uniqueOwnersPercentage && stats.standard !== TokenType.ERC1155) ? ( + {uniqueOwnersPercentage && stats.standard !== TokenType.ERC1155 ? ( {uniqueOwnersPercentage}% ) : null} - {stats.stats?.total_listings && stats.standard !== TokenType.ERC1155 ? ( {listedPercentageStr}% diff --git a/src/nft/components/details/AssetDetails.tsx b/src/nft/components/details/AssetDetails.tsx index 0c055e9e9f..1b3a63b87d 100644 --- a/src/nft/components/details/AssetDetails.tsx +++ b/src/nft/components/details/AssetDetails.tsx @@ -263,7 +263,7 @@ export const AssetDetails = ({ asset, collection }: AssetDetailsProps) => { return MediaType.Audio } else if (isVideo(asset.animationUrl ?? '')) { return MediaType.Video - } else if (!!asset.animationUrl) { + } else if (asset.animationUrl) { return MediaType.Embed } return MediaType.Image diff --git a/src/nft/components/icons.tsx b/src/nft/components/icons.tsx index 41d125e339..c67ac95870 100644 --- a/src/nft/components/icons.tsx +++ b/src/nft/components/icons.tsx @@ -3,7 +3,8 @@ import styled, { useTheme } from 'styled-components/macro' import { themeVars, vars } from '../css/sprinkles.css' -type SVGProps = React.SVGProps +// ESLint reports `fill` is missing, whereas it exists on an SVGProps type +type SVGProps = React.SVGProps & { fill?: string } export const UniIcon = (props: SVGProps) => ( @@ -599,7 +600,7 @@ export const ActivityTransferIcon = (props: SVGProps) => ( ) -export const ActivityExternalLinkIcon = (_props: SVGProps) => ( +export const ActivityExternalLinkIcon = () => ( diff --git a/src/nft/components/profile/list/SetDurationModal.tsx b/src/nft/components/profile/list/SetDurationModal.tsx index dee6aafde0..dee01a32cd 100644 --- a/src/nft/components/profile/list/SetDurationModal.tsx +++ b/src/nft/components/profile/list/SetDurationModal.tsx @@ -70,7 +70,7 @@ export const SetDurationModal = () => { const [errorState, setErrorState] = useState(ErrorState.valid) const setGlobalExpiration = useSellAsset((state) => state.setGlobalExpiration) const setCustomExpiration = (event: React.ChangeEvent) => { - setAmount(!!event.target.value.length ? event.target.value : '') + setAmount(event.target.value.length ? event.target.value : '') setDuration(displayDuration) } const selectDuration = (duration: Duration) => { diff --git a/src/nft/components/profile/view/ProfilePage.tsx b/src/nft/components/profile/view/ProfilePage.tsx index 95bbf16440..f635231aa1 100644 --- a/src/nft/components/profile/view/ProfilePage.tsx +++ b/src/nft/components/profile/view/ProfilePage.tsx @@ -90,7 +90,7 @@ export const ProfilePage = () => { isFetchingNextPage, isSuccess, } = useInfiniteQuery(['ownerCollections', { address }], getOwnerCollections, { - getNextPageParam: (lastGroup, _allGroups) => (lastGroup.data.length === 0 ? undefined : lastGroup.nextPage), + getNextPageParam: (lastGroup) => (lastGroup.data.length === 0 ? undefined : lastGroup.nextPage), refetchInterval: 15000, refetchIntervalInBackground: false, refetchOnWindowFocus: false, diff --git a/src/nft/hooks/useNFTSelect.ts b/src/nft/hooks/useNFTSelect.ts index 07d56ea2b0..82faafbbdd 100644 --- a/src/nft/hooks/useNFTSelect.ts +++ b/src/nft/hooks/useNFTSelect.ts @@ -25,7 +25,7 @@ export const useNFTSelect = create()( selectNFT: (nft) => set(({ selectedNFTs }) => { if (selectedNFTs.length === 0) return { selectedNFTs: [nft] } - else if (!!selectedNFTs.find((x) => x.id === nft.id)) + else if (selectedNFTs.some((x) => x.id === nft.id)) return { selectedNFTs: selectedNFTs.filter((n) => n.id !== nft.id) } else return { selectedNFTs: [...selectedNFTs, nft] } }), diff --git a/src/nft/hooks/useWalletCollections.ts b/src/nft/hooks/useWalletCollections.ts index 36a8bfc7d5..0c89429796 100644 --- a/src/nft/hooks/useWalletCollections.ts +++ b/src/nft/hooks/useWalletCollections.ts @@ -39,7 +39,7 @@ export const useWalletCollections = create()( setCollectionFilters: (address) => set(({ collectionFilters }) => { if (collectionFilters.length === 0) return { collectionFilters: [address] } - else if (!!collectionFilters.find((x) => x === address)) + else if (collectionFilters.some((x) => x === address)) return { collectionFilters: collectionFilters.filter((n) => n !== address) } else return { collectionFilters: [...collectionFilters, address] } }), diff --git a/src/nft/pages/profile/profile.tsx b/src/nft/pages/profile/profile.tsx index f3d8e08690..0c510d3346 100644 --- a/src/nft/pages/profile/profile.tsx +++ b/src/nft/pages/profile/profile.tsx @@ -49,7 +49,7 @@ const ProfileContent = () => { {/* TODO: figure out metadata tagging Genie | Sell */} - {!!account ? ( + {account ? ( {sellPageState === ProfilePageStateType.VIEWING ? : } diff --git a/src/nft/utils/listNfts.ts b/src/nft/utils/listNfts.ts index ac8c4e2268..a85fc4f096 100644 --- a/src/nft/utils/listNfts.ts +++ b/src/nft/utils/listNfts.ts @@ -168,7 +168,7 @@ export async function signListing( else setStatus(ListingStatus.FAILED) return false } - case 'LooksRare': + case 'LooksRare': { const addresses = addressesByNetwork[SupportedChainId.MAINNET] const currentTime = Math.round(Date.now() / 1000) const makerOrder: MakerOrder = { @@ -235,8 +235,8 @@ export async function signListing( else setStatus(ListingStatus.FAILED) return false } - - case 'X2Y2': + } + case 'X2Y2': { const orderItem: OfferItem = { price: parseEther(listingPrice.toString()), tokens: [ @@ -269,7 +269,7 @@ export async function signListing( else setStatus(ListingStatus.FAILED) return false } - + } default: return false } diff --git a/src/nft/utils/urlParams.ts b/src/nft/utils/urlParams.ts index 7e31a6c31c..fdfd9167a9 100644 --- a/src/nft/utils/urlParams.ts +++ b/src/nft/utils/urlParams.ts @@ -137,12 +137,11 @@ export const syncLocalFiltersWithURL = (state: CollectionFilters) => { const query: Record = {} urlFilterItems.forEach((key) => { switch (key) { - case 'traits': + case 'traits': { const traits = state.traits.map(({ trait_type, trait_value }) => `("${trait_type}","${trait_value}")`) - query['traits'] = traits break - + } case 'all': query['all'] = !state.buyNow break diff --git a/src/pages/Pool/PositionPage.tsx b/src/pages/Pool/PositionPage.tsx index 551da82fbe..8ebf64f10b 100644 --- a/src/pages/Pool/PositionPage.tsx +++ b/src/pages/Pool/PositionPage.tsx @@ -511,7 +511,7 @@ export function PositionPage() { provider, ]) - const owner = useSingleCallResult(!!tokenId ? positionManager : null, 'ownerOf', [tokenId]).result?.[0] + const owner = useSingleCallResult(tokenId ? positionManager : null, 'ownerOf', [tokenId]).result?.[0] const ownsNFT = owner === account || positionDetails?.operator === account const feeValueUpper = inverted ? feeValue0 : feeValue1 diff --git a/src/pages/Swap/index.tsx b/src/pages/Swap/index.tsx index 8d90835378..e5fd4b1887 100644 --- a/src/pages/Swap/index.tsx +++ b/src/pages/Swap/index.tsx @@ -172,7 +172,7 @@ export default function Swap({ className }: { className?: string }) { urlLoadedTokens && urlLoadedTokens .filter((token: Token) => { - return !Boolean(token.address in defaultTokens) + return !(token.address in defaultTokens) }) .filter((token: Token) => { // Any token addresses that are loaded from the shorthands map do not need to show the import URL diff --git a/src/serviceWorker/document.test.ts b/src/serviceWorker/document.test.ts index 6296c41b7c..4fa2241bdc 100644 --- a/src/serviceWorker/document.test.ts +++ b/src/serviceWorker/document.test.ts @@ -106,15 +106,15 @@ describe('document', () => { let fetched: Response const FETCHED_ETAGS = 'fetched' + const expectFetchToHaveBeenCalledWithRequestUrl = () => { + expect(fetch).toHaveBeenCalledWith(requestUrl, expect.anything()) + } + beforeEach(() => { fetched = new Response('test_body', { headers: { etag: FETCHED_ETAGS } }) fetch.mockReturnValueOnce(fetched) }) - afterEach(() => { - expect(fetch).toHaveBeenCalledWith(requestUrl, expect.anything()) - }) - describe('with a cached response', () => { let cached: Response @@ -132,6 +132,7 @@ describe('document', () => { await handleDocument(options) const abortSignal = fetch.mock.calls[0][1].signal expect(abortSignal.aborted).toBeTruthy() + expectFetchToHaveBeenCalledWithRequestUrl() }) it('returns the cached response', async () => { @@ -141,18 +142,21 @@ describe('document', () => { expect(await response.text()).toBe( 'mock' ) + expectFetchToHaveBeenCalledWithRequestUrl() }) }) it(`returns the fetched response with mismatched etags`, async () => { const response = await handleDocument(options) expect(response.body).toBe(fetched.body) + expectFetchToHaveBeenCalledWithRequestUrl() }) }) it(`returns the fetched response with no cached response`, async () => { const response = await handleDocument(options) expect(response.body).toBe(fetched.body) + expectFetchToHaveBeenCalledWithRequestUrl() }) }) }) diff --git a/src/serviceWorker/document.ts b/src/serviceWorker/document.ts index 5dfa44e3e5..d136cb7c2b 100644 --- a/src/serviceWorker/document.ts +++ b/src/serviceWorker/document.ts @@ -49,7 +49,7 @@ type HandlerContext = { * * In addition, this handler may serve an offline document if there is no internet connection. */ -export async function handleDocument(this: HandlerContext, { event, request }: RouteHandlerCallbackOptions) { +export async function handleDocument(this: HandlerContext, { request }: RouteHandlerCallbackOptions) { // If we are offline, serve the offline document. if ('onLine' in navigator && !navigator.onLine) return this?.offlineDocument?.clone() || fetch(request) diff --git a/src/state/application/hooks.ts b/src/state/application/hooks.ts index 0ceda4bc36..fa62fddc62 100644 --- a/src/state/application/hooks.ts +++ b/src/state/application/hooks.ts @@ -64,8 +64,7 @@ export function useFiatOnrampAvailability(shouldCheck: boolean, callback?: () => setError('Error, try again later.') dispatch(setFiatOnrampAvailability(false)) } finally { - if (stale) return - setLoading(false) + if (!stale) setLoading(false) } } @@ -88,7 +87,7 @@ export function useToggleModal(modal: ApplicationModal): () => void { return useCallback(() => dispatch(setOpenModal(isOpen ? null : modal)), [dispatch, modal, isOpen]) } -export function useCloseModal(_modal: ApplicationModal): () => void { +export function useCloseModal(): () => void { const dispatch = useAppDispatch() return useCallback(() => dispatch(setOpenModal(null)), [dispatch]) } diff --git a/src/state/application/updater.ts b/src/state/application/updater.ts index 8f181a5dd8..90a9b2f96f 100644 --- a/src/state/application/updater.ts +++ b/src/state/application/updater.ts @@ -6,7 +6,7 @@ import { useAppDispatch } from 'state/hooks' import { supportedChainId } from 'utils/supportedChainId' import { useCloseModal } from './hooks' -import { ApplicationModal, updateChainId } from './reducer' +import { updateChainId } from './reducer' export default function Updater(): null { const { account, chainId, provider } = useWeb3React() @@ -15,7 +15,7 @@ export default function Updater(): null { const [activeChainId, setActiveChainId] = useState(chainId) - const closeModal = useCloseModal(ApplicationModal.WALLET_DROPDOWN) + const closeModal = useCloseModal() const previousAccountValue = useRef(account) useEffect(() => { if (account && account !== previousAccountValue.current) { diff --git a/src/state/lists/reducer.test.ts b/src/state/lists/reducer.test.ts index b5fe596100..0b14cd66fb 100644 --- a/src/state/lists/reducer.test.ts +++ b/src/state/lists/reducer.test.ts @@ -386,18 +386,19 @@ describe('list reducer', () => { it('each of those initialized lists is empty', () => { const byUrl = store.getState().byUrl - // note we don't expect the uniswap default list to be prepopulated - // this is ok. - Object.keys(byUrl).forEach((url) => { - if (url !== 'https://unpkg.com/@uniswap/default-token-list@latest/uniswap-default.tokenlist.json') { - expect(byUrl[url]).toEqual({ + Object.entries(byUrl) + // We don't expect the Uniswap default list to be prepopulated + .filter( + ([url]) => url !== 'https://unpkg.com/@uniswap/default-token-list@latest/uniswap-default.tokenlist.json' + ) + .forEach(([, state]) => { + expect(state).toEqual({ error: null, current: null, loadingRequestId: null, pendingUpdate: null, }) - } - }) + }) }) it('sets initialized lists', () => { diff --git a/src/state/lists/updater.ts b/src/state/lists/updater.ts index 737b5bc91a..d47ec9b7ef 100644 --- a/src/state/lists/updater.ts +++ b/src/state/lists/updater.ts @@ -60,7 +60,7 @@ export default function Updater(): null { case VersionUpgrade.NONE: throw new Error('unexpected no version bump') case VersionUpgrade.PATCH: - case VersionUpgrade.MINOR: + case VersionUpgrade.MINOR: { const min = minVersionBump(list.current.tokens, list.pendingUpdate.tokens) // automatically update minor/patch as long as bump matches the min update if (bump >= min) { @@ -71,7 +71,7 @@ export default function Updater(): null { ) } break - + } // update any active or inactive lists case VersionUpgrade.MAJOR: dispatch(acceptListUpdate(listUrl)) diff --git a/src/state/lists/wrappedTokenInfo.ts b/src/state/lists/wrappedTokenInfo.ts index fd4ed585fb..3d5a1125d7 100644 --- a/src/state/lists/wrappedTokenInfo.ts +++ b/src/state/lists/wrappedTokenInfo.ts @@ -11,8 +11,8 @@ interface TagInfo extends TagDetails { * Token instances created from token info on a token list. */ export class WrappedTokenInfo implements Token { - public readonly isNative: false = false - public readonly isToken: true = true + public readonly isNative = false as const + public readonly isToken = true as const public readonly list?: TokenList public readonly tokenInfo: TokenInfo diff --git a/src/state/transactions/types.ts b/src/state/transactions/types.ts index 5f6e38f0dd..aa5de3a2e8 100644 --- a/src/state/transactions/types.ts +++ b/src/state/transactions/types.ts @@ -92,13 +92,13 @@ export interface ExactOutputSwapTransactionInfo extends BaseSwapTransactionInfo maximumInputCurrencyAmountRaw: string } -export interface DepositLiquidityStakingTransactionInfo { +interface DepositLiquidityStakingTransactionInfo { type: TransactionType.DEPOSIT_LIQUIDITY_STAKING token0Address: string token1Address: string } -export interface WithdrawLiquidityStakingTransactionInfo { +interface WithdrawLiquidityStakingTransactionInfo { type: TransactionType.WITHDRAW_LIQUIDITY_STAKING token0Address: string token1Address: string @@ -164,7 +164,7 @@ export interface RemoveLiquidityV3TransactionInfo { expectedAmountQuoteRaw: string } -export interface SubmitProposalTransactionInfo { +interface SubmitProposalTransactionInfo { type: TransactionType.SUBMIT_PROPOSAL } diff --git a/src/theme/components/RadialGradientByChainUpdater.ts b/src/theme/components/RadialGradientByChainUpdater.ts index b02f84a901..93245feaa4 100644 --- a/src/theme/components/RadialGradientByChainUpdater.ts +++ b/src/theme/components/RadialGradientByChainUpdater.ts @@ -48,7 +48,7 @@ export default function RadialGradientByChainUpdater(): null { switch (chainId) { case SupportedChainId.ARBITRUM_ONE: - case SupportedChainId.ARBITRUM_RINKEBY: + case SupportedChainId.ARBITRUM_RINKEBY: { setBackground(backgroundResetStyles) const arbitrumLightGradient = 'radial-gradient(100% 100% at 50% 0%, rgba(205, 232, 251, 0.7) 0%, rgba(252, 243, 249, 0.6536) 49.48%, rgba(255, 255, 255, 0) 100%), #FFFFFF' @@ -56,8 +56,9 @@ export default function RadialGradientByChainUpdater(): null { 'radial-gradient(100% 100% at 50% 0%, rgba(10, 41, 75, 0.7) 0%, rgba(34, 30, 48, 0.6536) 49.48%, rgba(31, 33, 40, 0) 100%), #0D0E0E' backgroundRadialGradientElement.style.background = darkMode ? arbitrumDarkGradient : arbitrumLightGradient break + } case SupportedChainId.OPTIMISM: - case SupportedChainId.OPTIMISM_GOERLI: + case SupportedChainId.OPTIMISM_GOERLI: { setBackground(backgroundResetStyles) const optimismLightGradient = 'radial-gradient(100% 100% at 50% 0%, rgba(255, 251, 242, 0.8) 0%, rgba(255, 244, 249, 0.6958) 50.52%, rgba(255, 255, 255, 0) 100%), #FFFFFF' @@ -65,8 +66,9 @@ export default function RadialGradientByChainUpdater(): null { 'radial-gradient(100% 100% at 50% 0%, rgba(62, 46, 56, 0.8) 0%, rgba(44, 31, 45, 0.6958) 50.52%, rgba(31, 33, 40, 0) 100%), #0D0E0E' backgroundRadialGradientElement.style.background = darkMode ? optimismDarkGradient : optimismLightGradient break + } case SupportedChainId.POLYGON: - case SupportedChainId.POLYGON_MUMBAI: + case SupportedChainId.POLYGON_MUMBAI: { setBackground(backgroundResetStyles) const polygonLightGradient = 'radial-gradient(100% 100% at 50% 0%, rgba(130, 71, 229, 0.2) 0%, rgba(200, 168, 255, 0.05) 52.6%, rgba(0, 0, 0, 0) 100%), #FFFFFF' @@ -74,8 +76,9 @@ export default function RadialGradientByChainUpdater(): null { 'radial-gradient(100% 100% at 50% 0%, rgba(130, 71, 229, 0.2) 0%, rgba(200, 168, 255, 0.05) 52.6%, rgba(0, 0, 0, 0) 100%), #0D0E0E' backgroundRadialGradientElement.style.background = darkMode ? polygonDarkGradient : polygonLightGradient break + } case SupportedChainId.CELO: - case SupportedChainId.CELO_ALFAJORES: + case SupportedChainId.CELO_ALFAJORES: { setBackground(backgroundResetStyles) const celoLightGradient = 'radial-gradient(100% 100% at 50% 0%, rgba(186, 228, 210, 0.7) 0%, rgba(252, 243, 249, 0.6536) 49.48%, rgba(255, 255, 255, 0) 100%), #FFFFFF' @@ -83,12 +86,14 @@ export default function RadialGradientByChainUpdater(): null { 'radial-gradient(100% 100% at 50% 0%, rgba(20, 49, 37, 0.29) 0%, rgba(12, 31, 23, 0.6536) 49.48%, rgba(31, 33, 40, 0) 100%, rgba(31, 33, 40, 0) 100%), #0D0E0E' backgroundRadialGradientElement.style.background = darkMode ? celoDarkGradient : celoLightGradient break - default: + } + default: { setBackground(initialStyles) const defaultLightGradient = 'radial-gradient(100% 100% at 50% 0%, rgba(255, 184, 226, 0.51) 0%, rgba(255, 255, 255, 0) 100%), #FFFFFF' const defaultDarkGradient = 'linear-gradient(180deg, #202738 0%, #070816 100%)' backgroundRadialGradientElement.style.background = darkMode ? defaultDarkGradient : defaultLightGradient + } } }, [darkMode, chainId, isNftPage]) return null diff --git a/src/theme/index.tsx b/src/theme/index.tsx index e1a6fa10d0..d0876f1324 100644 --- a/src/theme/index.tsx +++ b/src/theme/index.tsx @@ -17,6 +17,17 @@ export const MEDIA_WIDTHS = { deprecated_upToLarge: 1280, } +const deprecated_mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: typeof css } = Object.keys( + MEDIA_WIDTHS +).reduce((acc, size) => { + acc[size] = (a: any, b: any, c: any) => css` + @media (max-width: ${(MEDIA_WIDTHS as any)[size]}px) { + ${css(a, b, c)} + } + ` + return acc +}, {} as any) + export const BREAKPOINTS = { xs: 396, sm: 640, @@ -53,17 +64,6 @@ const fonts = { code: 'courier, courier new, serif', } -const deprecated_mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: typeof css } = Object.keys( - MEDIA_WIDTHS -).reduce((accumulator, size) => { - ;(accumulator as any)[size] = (a: any, b: any, c: any) => css` - @media (max-width: ${(MEDIA_WIDTHS as any)[size]}px) { - ${css(a, b, c)} - } - ` - return accumulator -}, {}) as any - function getSettings(darkMode: boolean) { return { grids: { diff --git a/src/utils/anonymizeLink.test.ts b/src/utils/anonymizeLink.test.ts index 7e04d7d72d..c4b20ec881 100644 --- a/src/utils/anonymizeLink.test.ts +++ b/src/utils/anonymizeLink.test.ts @@ -7,15 +7,10 @@ describe('#anonymizeLink', () => { it('anonymizes any addresses in etherscan urls', () => { expect(anonymizeLink('https://etherscan.io/address/0xabcd')).toEqual('https://etherscan.io/address/***') }) - it('anonymizes any addresses in etherscan urls', () => { - expect(anonymizeLink('https://etherscan.io/address/0xabcd')).toEqual('https://etherscan.io/address/***') - }) it('anonymizes any addresses in testnet etherscan urls', () => { expect(anonymizeLink('https://goerli.etherscan.io/address/0xabcd')).toEqual( 'https://goerli.etherscan.io/address/***' ) - }) - it('anonymizes any addresses in testnet etherscan urls', () => { expect(anonymizeLink('https://ropsten.etherscan.io/address/0xabcd')).toEqual( 'https://ropsten.etherscan.io/address/***' ) diff --git a/src/utils/formatNumbers.test.ts b/src/utils/formatNumbers.test.ts index 85b36f6e37..e5cba923e4 100644 --- a/src/utils/formatNumbers.test.ts +++ b/src/utils/formatNumbers.test.ts @@ -88,6 +88,7 @@ describe('formatTransactionAmount', () => { expect(formatTransactionAmount(1234567.8901)).toEqual('1,234,567.89') }) it('Number ≥ 1M extra long', () => { + // eslint-disable-next-line @typescript-eslint/no-loss-of-precision expect(formatTransactionAmount(1234567890123456.789)).toEqual('1.234568e+15') }) }) diff --git a/src/utils/retry.ts b/src/utils/retry.ts index 2916c0f500..d2e34a8a01 100644 --- a/src/utils/retry.ts +++ b/src/utils/retry.ts @@ -10,7 +10,7 @@ function waitRandom(min: number, max: number): Promise { * This error is thrown if the function is cancelled before completing */ class CancelledError extends Error { - public isCancelledError: true = true + public isCancelledError = true as const constructor() { super('Cancelled') } @@ -20,7 +20,7 @@ class CancelledError extends Error { * Throw this error if the function should retry */ export class RetryableError extends Error { - public isRetryableError: true = true + public isRetryableError = true as const } export interface RetryOptions { @@ -42,8 +42,10 @@ export function retry( ): { promise: Promise; cancel: () => void } { let completed = false let rejectCancelled: (error: Error) => void + // eslint-disable-next-line no-async-promise-executor const promise = new Promise(async (resolve, reject) => { rejectCancelled = reject + // eslint-disable-next-line no-constant-condition while (true) { let result: T try { diff --git a/src/utils/swapErrorToUserReadableMessage.tsx b/src/utils/swapErrorToUserReadableMessage.tsx index 0840fc7317..d2891b4bc9 100644 --- a/src/utils/swapErrorToUserReadableMessage.tsx +++ b/src/utils/swapErrorToUserReadableMessage.tsx @@ -15,7 +15,7 @@ export function swapErrorToUserReadableMessage(error: any): string { } } - while (Boolean(error)) { + while (error) { reason = error.reason ?? error.message ?? reason error = error.error ?? error.data?.originalError } diff --git a/yarn.lock b/yarn.lock index c9d2eb81c5..30e83d5ccb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3608,6 +3608,11 @@ estree-walker "^1.0.1" picomatch "^2.2.2" +"@rushstack/eslint-patch@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz#8be36a1f66f3265389e90b5f9c9962146758f728" + integrity sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg== + "@sentry/browser@7.20.1": version "7.20.1" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.20.1.tgz#bce606db24fa02fb72e71187e510ff890f8be903" @@ -4349,10 +4354,10 @@ resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" integrity sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA== -"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7": - version "7.0.9" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" - integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== +"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.9": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== "@types/json-stable-stringify@^1.0.32": version "1.0.34" @@ -4572,6 +4577,11 @@ dependencies: "@types/node" "*" +"@types/semver@^7.3.12": + version "7.3.13" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" + integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== + "@types/sinonjs__fake-timers@8.1.1": version "8.1.1" resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3" @@ -4721,7 +4731,7 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^4", "@typescript-eslint/eslint-plugin@^4.5.0": +"@typescript-eslint/eslint-plugin@^4.5.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== @@ -4735,6 +4745,21 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/eslint-plugin@^5.45.1": + version "5.47.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.47.0.tgz#dadb79df3b0499699b155839fd6792f16897d910" + integrity sha512-AHZtlXAMGkDmyLuLZsRpH3p4G/1iARIwc/T0vIem2YB+xW6pZaXYXzCBnZSF/5fdM97R9QqZWZ+h3iW10XgevQ== + dependencies: + "@typescript-eslint/scope-manager" "5.47.0" + "@typescript-eslint/type-utils" "5.47.0" + "@typescript-eslint/utils" "5.47.0" + debug "^4.3.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/experimental-utils@4.33.0", "@typescript-eslint/experimental-utils@^4.0.1": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" @@ -4758,7 +4783,7 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4", "@typescript-eslint/parser@^4.5.0": +"@typescript-eslint/parser@^4.5.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== @@ -4768,6 +4793,16 @@ "@typescript-eslint/typescript-estree" "4.33.0" debug "^4.3.1" +"@typescript-eslint/parser@^5.45.1": + version "5.47.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.47.0.tgz#62e83de93499bf4b500528f74bf2e0554e3a6c8d" + integrity sha512-udPU4ckK+R1JWCGdQC4Qa27NtBg7w020ffHqGyAK8pAgOVuNw7YaKXGChk+udh+iiGIJf6/E/0xhVXyPAbsczw== + dependencies: + "@typescript-eslint/scope-manager" "5.47.0" + "@typescript-eslint/types" "5.47.0" + "@typescript-eslint/typescript-estree" "5.47.0" + debug "^4.3.4" + "@typescript-eslint/scope-manager@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" @@ -4776,6 +4811,24 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" +"@typescript-eslint/scope-manager@5.47.0": + version "5.47.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.47.0.tgz#f58144a6b0ff58b996f92172c488813aee9b09df" + integrity sha512-dvJab4bFf7JVvjPuh3sfBUWsiD73aiftKBpWSfi3sUkysDQ4W8x+ZcFpNp7Kgv0weldhpmMOZBjx1wKN8uWvAw== + dependencies: + "@typescript-eslint/types" "5.47.0" + "@typescript-eslint/visitor-keys" "5.47.0" + +"@typescript-eslint/type-utils@5.47.0": + version "5.47.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.47.0.tgz#2b440979c574e317d3473225ae781f292c99e55d" + integrity sha512-1J+DFFrYoDUXQE1b7QjrNGARZE6uVhBqIvdaXTe5IN+NmEyD68qXR1qX1g2u4voA+nCaelQyG8w30SAOihhEYg== + dependencies: + "@typescript-eslint/typescript-estree" "5.47.0" + "@typescript-eslint/utils" "5.47.0" + debug "^4.3.4" + tsutils "^3.21.0" + "@typescript-eslint/types@3.10.1": version "3.10.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727" @@ -4786,6 +4839,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== +"@typescript-eslint/types@5.47.0": + version "5.47.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.47.0.tgz#67490def406eaa023dbbd8da42ee0d0c9b5229d3" + integrity sha512-eslFG0Qy8wpGzDdYKu58CEr3WLkjwC5Usa6XbuV89ce/yN5RITLe1O8e+WFEuxnfftHiJImkkOBADj58ahRxSg== + "@typescript-eslint/typescript-estree@3.10.1": version "3.10.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853" @@ -4813,6 +4871,33 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.47.0": + version "5.47.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.0.tgz#ed971a11c5c928646d6ba7fc9dfdd6e997649aca" + integrity sha512-LxfKCG4bsRGq60Sqqu+34QT5qT2TEAHvSCCJ321uBWywgE2dS0LKcu5u+3sMGo+Vy9UmLOhdTw5JHzePV/1y4Q== + dependencies: + "@typescript-eslint/types" "5.47.0" + "@typescript-eslint/visitor-keys" "5.47.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.47.0", "@typescript-eslint/utils@^5.10.0": + version "5.47.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.47.0.tgz#b5005f7d2696769a1fdc1e00897005a25b3a0ec7" + integrity sha512-U9xcc0N7xINrCdGVPwABjbAKqx4GK67xuMV87toI+HUqgXj26m6RBp9UshEXcTrgCkdGYFzgKLt8kxu49RilDw== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.47.0" + "@typescript-eslint/types" "5.47.0" + "@typescript-eslint/typescript-estree" "5.47.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + "@typescript-eslint/visitor-keys@3.10.1": version "3.10.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931" @@ -4828,6 +4913,14 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@5.47.0": + version "5.47.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.0.tgz#4aca4efbdf6209c154df1f7599852d571b80bb45" + integrity sha512-ByPi5iMa6QqDXe/GmT/hR6MZtVPi0SqMQPDx15FczCBXJo/7M8T88xReOALAfpBLm+zxpPfmhuEvPb577JRAEg== + dependencies: + "@typescript-eslint/types" "5.47.0" + eslint-visitor-keys "^3.3.0" + "@uniswap/analytics-events@^1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@uniswap/analytics-events/-/analytics-events-1.5.0.tgz#1f5a6e0fedb46e551745c2b4d2b791fe44964cfa" @@ -4852,6 +4945,26 @@ resolved "https://registry.yarnpkg.com/@uniswap/default-token-list/-/default-token-list-2.2.0.tgz#d85a5c2520f57f4920bd989dfc9f01e1b701a567" integrity sha512-vFPWoGzDjHP4i2l7yLaober/lZMmzOZXXirVF8XNyfNzRxgmYCWKO6SzKtfEUwxpd3/KUebgdK55II4Mnak62A== +"@uniswap/eslint-config@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@uniswap/eslint-config/-/eslint-config-1.1.1.tgz#83d2633dad6507ca58bc11c8892035812059488e" + integrity sha512-vND/oJTmGCxYpY0E+iXWZT0mJT21/Ryf48yLP0kyWNnXzB5WyJuqei2gHx3nr+HWwRNF6aEbToRr9jNh+J3uBg== + dependencies: + "@rushstack/eslint-patch" "^1.2.0" + "@typescript-eslint/eslint-plugin" "^5.45.1" + "@typescript-eslint/parser" "^5.45.1" + eslint-config-prettier "^8.5.0" + eslint-import-resolver-typescript "^3.5.2" + eslint-plugin-cypress "^2.12.1" + eslint-plugin-import "^2.26.0" + eslint-plugin-jest "^27.1.6" + eslint-plugin-prettier "^4.2.1" + eslint-plugin-react "^7.31.11" + eslint-plugin-react-hooks "^4.6.0" + eslint-plugin-simple-import-sort "^8.0.0" + eslint-plugin-unused-imports "^2.0.0" + prettier "^2.8.0" + "@uniswap/governance@^1.0.2": version "1.0.2" resolved "https://registry.npmjs.org/@uniswap/governance/-/governance-1.0.2.tgz" @@ -6248,7 +6361,7 @@ array-flatten@^2.1.0: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== -array-includes@^3.1.1, array-includes@^3.1.2, array-includes@^3.1.3, array-includes@^3.1.4: +array-includes@^3.1.1, array-includes@^3.1.2, array-includes@^3.1.3, array-includes@^3.1.4, array-includes@^3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== @@ -6291,15 +6404,26 @@ array.prototype.flat@^1.2.4, array.prototype.flat@^1.2.5: es-abstract "^1.20.4" es-shim-unscopables "^1.0.0" -array.prototype.flatmap@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz#94cfd47cc1556ec0747d97f7c7738c58122004c9" - integrity sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q== +array.prototype.flatmap@^1.2.4, array.prototype.flatmap@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" + integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - function-bind "^1.1.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + +array.prototype.tosorted@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz#ccf44738aa2b5ac56578ffda97c03fd3e23dd532" + integrity sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.1.3" arrify@^2.0.1: version "2.0.1" @@ -9604,12 +9728,10 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^6.11.0: - version "6.15.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz" - integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== - dependencies: - get-stdin "^6.0.0" +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== eslint-config-react-app@^6.0.0: version "6.0.0" @@ -9646,13 +9768,12 @@ eslint-module-utils@^2.7.3: dependencies: debug "^3.2.7" -eslint-plugin-better-styled-components@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-better-styled-components/-/eslint-plugin-better-styled-components-1.1.2.tgz#cc8af5607abfcdabb53160e94f8e342582a46031" - integrity sha512-pGLIv8Z05xnmMyDyLWV65KQs7HU+FN403Tqb5xv3BZvw5kjC3K18/aYm7mcRpLLPse5/lwhX8ieGQKflPgr0xQ== +eslint-plugin-cypress@^2.12.1: + version "2.12.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632" + integrity sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA== dependencies: - postcss "^7.0.2" - requireindex "~1.1.0" + globals "^11.12.0" eslint-plugin-flowtype@^5.2.0: version "5.8.0" @@ -9688,6 +9809,13 @@ eslint-plugin-jest@^24.1.0: dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" +eslint-plugin-jest@^27.1.6: + version "27.1.7" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.1.7.tgz#0351e904afb8d66b7f70452929556dfdc8daba0d" + integrity sha512-0QVzf+og4YI1Qr3UoprkqqhezAZjFffdi62b0IurkCXMqPtRW84/UT4CKsYT80h/D82LA9avjO/80Ou1LdgbaQ== + dependencies: + "@typescript-eslint/utils" "^5.10.0" + eslint-plugin-jsx-a11y@^6.3.1: version "6.4.1" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz#a2d84caa49756942f42f1ffab9002436391718fd" @@ -9705,10 +9833,10 @@ eslint-plugin-jsx-a11y@^6.3.1: jsx-ast-utils "^3.1.0" language-tags "^1.0.5" -eslint-plugin-prettier@^3.1.3: - version "3.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz#e9ddb200efb6f3d05ffe83b1665a716af4a387e5" - integrity sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g== +eslint-plugin-prettier@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: prettier-linter-helpers "^1.0.0" @@ -9717,28 +9845,31 @@ eslint-plugin-react-hooks@^4.2.0, eslint-plugin-react-hooks@^4.6.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== -eslint-plugin-react@^7.21.5: - version "7.24.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.24.0.tgz#eadedfa351a6f36b490aa17f4fa9b14e842b9eb4" - integrity sha512-KJJIx2SYx7PBx3ONe/mEeMz4YE0Lcr7feJTCMyyKb/341NcjuAgim3Acgan89GfPv7nxXK2+0slu0CWXYM4x+Q== +eslint-plugin-react@^7.21.5, eslint-plugin-react@^7.31.11: + version "7.31.11" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.31.11.tgz#011521d2b16dcf95795df688a4770b4eaab364c8" + integrity sha512-TTvq5JsT5v56wPa9OYHzsrOlHzKZKjV+aLgS+55NJP/cuzdiQPC7PfYoUjMoxlffKtvijpk7vA/jmuqRb9nohw== dependencies: - array-includes "^3.1.3" - array.prototype.flatmap "^1.2.4" + array-includes "^3.1.6" + array.prototype.flatmap "^1.3.1" + array.prototype.tosorted "^1.1.1" doctrine "^2.1.0" - has "^1.0.3" + estraverse "^5.3.0" jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.0.4" - object.entries "^1.1.4" - object.fromentries "^2.0.4" - object.values "^1.1.4" - prop-types "^15.7.2" + minimatch "^3.1.2" + object.entries "^1.1.6" + object.fromentries "^2.0.6" + object.hasown "^1.1.2" + object.values "^1.1.6" + prop-types "^15.8.1" resolve "^2.0.0-next.3" - string.prototype.matchall "^4.0.5" + semver "^6.3.0" + string.prototype.matchall "^4.0.8" -eslint-plugin-simple-import-sort@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz#a1dad262f46d2184a90095a60c66fef74727f0f8" - integrity sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw== +eslint-plugin-simple-import-sort@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-8.0.0.tgz#9d9a2372b0606e999ea841b10458a370a6ccc160" + integrity sha512-bXgJQ+lqhtQBCuWY/FUWdB27j4+lqcvXv5rUARkzbeWLwea+S5eBZEQrhnO+WgX3ZoJHVj0cn943iyXwByHHQw== eslint-plugin-testing-library@^3.9.2: version "3.10.2" @@ -9799,6 +9930,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + eslint-webpack-plugin@^2.5.2: version "2.5.4" resolved "https://registry.yarnpkg.com/eslint-webpack-plugin/-/eslint-webpack-plugin-2.5.4.tgz#473b84932f1a8e2c2b8e66a402d0497bf440b986" @@ -9895,10 +10031,10 @@ estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== estree-walker@^0.6.1: version "0.6.1" @@ -10390,7 +10526,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.1.1, fast-glob@^3.2.11: +fast-glob@^3.1.1, fast-glob@^3.2.11, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== @@ -10900,11 +11036,6 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - get-stream@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" @@ -11033,7 +11164,7 @@ global@~4.4.0: min-document "^2.19.0" process "^0.11.10" -globals@^11.1.0: +globals@^11.1.0, globals@^11.12.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== @@ -11062,16 +11193,16 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" -globby@^11.0.3: - version "11.0.3" - resolved "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== +globby@^11.0.3, globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" slash "^3.0.0" globby@^13.1.2: @@ -14060,6 +14191,11 @@ native-url@^0.2.6: dependencies: querystring "^0.2.0" +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -14369,24 +14505,23 @@ object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.0, object.entries@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.4.tgz#43ccf9a50bc5fd5b649d45ab1a579f24e088cafd" - integrity sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA== +object.entries@^1.1.0, object.entries@^1.1.4, object.entries@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" + integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" -object.fromentries@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.4.tgz#26e1ba5c4571c5c6f0890cef4473066456a120b8" - integrity sha512-EsFBshs5RUUpQEY1D4q/m59kMfz4YJvxuNCJcv/jWwOJr34EaVnG11ZrZa0UHB3wnzV1wx8m58T4hQL8IuNXlQ== +object.fromentries@^2.0.4, object.fromentries@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" + integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - has "^1.0.3" + define-properties "^1.1.4" + es-abstract "^1.20.4" object.getownpropertydescriptors@^2.0.3: version "2.1.2" @@ -14397,6 +14532,14 @@ object.getownpropertydescriptors@^2.0.3: define-properties "^1.1.3" es-abstract "^1.18.0-next.2" +object.hasown@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.2.tgz#f919e21fad4eb38a57bc6345b3afd496515c3f92" + integrity sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw== + dependencies: + define-properties "^1.1.4" + es-abstract "^1.20.4" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -14404,7 +14547,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0, object.values@^1.1.4, object.values@^1.1.5: +object.values@^1.1.0, object.values@^1.1.4, object.values@^1.1.5, object.values@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== @@ -15724,10 +15867,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.1.2, prettier@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" - integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== +prettier@^2.1.2, prettier@^2.7.1, prettier@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" + integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== pretty-bytes@^5.3.0, pretty-bytes@^5.6.0: version "5.6.0" @@ -15819,7 +15962,7 @@ prompts@2.4.0, prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -16599,7 +16742,7 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1, regexp.prototype.f define-properties "^1.1.3" functions-have-names "^1.2.2" -regexpp@^3.1.0: +regexpp@^3.1.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -16758,11 +16901,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requireindex@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162" - integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI= - requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -17842,18 +17980,18 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string.prototype.matchall@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz#59370644e1db7e4c0c045277690cf7b01203c4da" - integrity sha512-Z5ZaXO0svs0M2xd/6By3qpeKpLKd9mO4v4q3oMEQrk8Ck4xOD5d5XeBOOjGrmVZZ/AHB1S0CgG4N5r1G9N3E2Q== +string.prototype.matchall@^4.0.5, string.prototype.matchall@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" + integrity sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.2" - get-intrinsic "^1.1.1" - has-symbols "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" internal-slot "^1.0.3" - regexp.prototype.flags "^1.3.1" + regexp.prototype.flags "^1.4.3" side-channel "^1.0.4" string.prototype.trimend@^1.0.5: