From aca5e9d88c756cf86e08be957ad42052776fcca4 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 21 Nov 2024 12:48:21 -1000 Subject: [PATCH 1/3] chore: update prettier to v3 + related deps --- lavamoat/browserify/beta/policy.json | 2 + lavamoat/browserify/flask/policy.json | 2 + lavamoat/browserify/main/policy.json | 2 + lavamoat/browserify/mmi/policy.json | 2 + lavamoat/build-system/policy.json | 855 ++------------------------ package.json | 6 +- yarn.lock | 245 +++++--- 7 files changed, 229 insertions(+), 885 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index a5581cd16a85..97b8346e9a98 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -3553,6 +3553,8 @@ }, "@swc/helpers>tslib": { "globals": { + "AsyncIterator": true, + "Iterator": true, "SuppressedError": true, "define": true } diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index a5581cd16a85..97b8346e9a98 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -3553,6 +3553,8 @@ }, "@swc/helpers>tslib": { "globals": { + "AsyncIterator": true, + "Iterator": true, "SuppressedError": true, "define": true } diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index a5581cd16a85..97b8346e9a98 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -3553,6 +3553,8 @@ }, "@swc/helpers>tslib": { "globals": { + "AsyncIterator": true, + "Iterator": true, "SuppressedError": true, "define": true } diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 672c34d8faea..c33d6c9f54df 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -3645,6 +3645,8 @@ }, "@swc/helpers>tslib": { "globals": { + "AsyncIterator": true, + "Iterator": true, "SuppressedError": true, "define": true } diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 5338922720ef..4377c3210cb6 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -2040,7 +2040,8 @@ "chokidar>normalize-path": true, "chokidar>readdirp": true, "del>is-glob": true, - "eslint>glob-parent": true + "eslint>glob-parent": true, + "tsx>fsevents": true } }, "chokidar>anymatch": { @@ -2822,7 +2823,7 @@ "eslint-plugin-prettier": { "packages": { "eslint-plugin-prettier>prettier-linter-helpers": true, - "prettier": true + "eslint-plugin-prettier>synckit": true } }, "eslint-plugin-prettier>prettier-linter-helpers": { @@ -2830,6 +2831,55 @@ "eslint-plugin-prettier>prettier-linter-helpers>fast-diff": true } }, + "eslint-plugin-prettier>synckit": { + "builtin": { + "node:crypto.createHash": true, + "node:fs.mkdirSync": true, + "node:fs.statSync": true, + "node:fs.writeFileSync": true, + "node:module.createRequire": true, + "node:module.register": true, + "node:path.dirname": true, + "node:path.extname": true, + "node:path.isAbsolute": true, + "node:path.resolve": true, + "node:url.fileURLToPath": true, + "node:url.pathToFileURL": true, + "node:worker_threads.MessageChannel": true, + "node:worker_threads.Worker": true, + "node:worker_threads.parentPort.on": true, + "node:worker_threads.receiveMessageOnPort": true, + "node:worker_threads.workerData": true + }, + "globals": { + "URL": true, + "__dirname": true, + "process.env.NODE_OPTIONS": true, + "process.env.SYNCKIT_EXEC_ARGV": true, + "process.env.SYNCKIT_GLOBAL_SHIMS": true, + "process.env.SYNCKIT_TIMEOUT": true, + "process.env.SYNCKIT_TS_RUNNER": true, + "process.versions.node": true, + "process.versions.pnp": true + }, + "packages": { + "eslint-plugin-prettier>synckit>@pkgr/core": true + } + }, + "eslint-plugin-prettier>synckit>@pkgr/core": { + "builtin": { + "node:fs.existsSync": true, + "node:fs.statSync": true, + "node:module.createRequire": true, + "node:path.isAbsolute": true, + "node:path.resolve": true, + "node:path.sep": true + }, + "globals": { + "console.assert": true, + "process.cwd": true + } + }, "eslint-plugin-react": { "builtin": { "fs.statSync": true, @@ -6655,800 +6705,6 @@ "console": true } }, - "prettier": { - "builtin": { - "assert": true, - "events.EventEmitter": true, - "fs": true, - "module._nodeModulePaths": true, - "module._resolveFilename": true, - "os": true, - "path": true, - "stream.PassThrough": true, - "stream.Readable": true, - "util.inherits": true, - "util.inspect": true, - "util.promisify": true - }, - "globals": { - "ANONYMOUS": true, - "Buffer": true, - "BuilderFileEmit": true, - "BuilderProgramKind": true, - "BuilderState": true, - "CheckMode": true, - "ClassificationType": true, - "ClassificationTypeNames": true, - "CompletionInfoFlags": true, - "CompletionTriggerKind": true, - "ConfigFileProgramReloadLevel": true, - "CoreServicesShimHostAdapter": true, - "DocumentHighlights": true, - "Element": true, - "EndOfLineState": true, - "ExportKind": true, - "FileSystemEntryKind": true, - "FileWatcherEventKind": true, - "FlattenLevel": true, - "ForegroundColorEscapeSequences": true, - "HTMLElement": true, - "HighlightSpanKind": true, - "ImportKind": true, - "IndentStyle": true, - "InlayHintKind": true, - "Intl": true, - "InvalidatedProjectKind": true, - "LanguageServiceMode": true, - "LanguageServiceShimHostAdapter": true, - "ModuleInstanceState": true, - "NodeResolutionFeatures": true, - "OrganizeImportsMode": true, - "OutliningSpanKind": true, - "OutputFileType": true, - "PackageJsonAutoImportPreference": true, - "PackageJsonDependencyGroup": true, - "PatternMatchKind": true, - "PollingInterval": true, - "PrivateIdentifierKind": true, - "ProcessLevel": true, - "QuotePreference": true, - "SVGElement": true, - "ScriptElementKind": true, - "ScriptElementKindModifier": true, - "ScriptSnapshot": true, - "SemanticClassificationFormat": true, - "SemanticMeaning": true, - "SemicolonPreference": true, - "SignatureCheckMode": true, - "SymbolDisplayPartKind": true, - "TokenClass": true, - "TypeFacts": true, - "TypeScriptServicesFactory": true, - "UpToDateStatusType": true, - "Version": true, - "VersionRange": true, - "WatchLogLevel": true, - "WatchType": true, - "WorkerGlobalScope": true, - "YAML_SILENCE_DEPRECATION_WARNINGS": true, - "YAML_SILENCE_WARNINGS": true, - "__dirname": true, - "__filename": true, - "accessPrivateIdentifier": true, - "addEmitFlags": true, - "addEmitHelper": true, - "addEmitHelpers": true, - "addInternalEmitFlags": true, - "addSyntheticLeadingComment": true, - "addSyntheticTrailingComment": true, - "advancedAsyncSuperHelper": true, - "affectsDeclarationPathOptionDeclarations": true, - "affectsEmitOptionDeclarations": true, - "allKeysStartWithDot": true, - "assertDoc": true, - "assignHelper": true, - "asyncDelegator": true, - "asyncGeneratorHelper": true, - "asyncSuperHelper": true, - "asyncValues": true, - "atob": true, - "awaitHelper": true, - "awaiterHelper": true, - "bindSourceFile": true, - "breakIntoCharacterSpans": true, - "breakIntoWordSpans": true, - "btoa": true, - "buildLinkParts": true, - "buildOpts": true, - "buildOverload": true, - "bundlerModuleNameResolver": true, - "canBeConvertedToAsync": true, - "canJsonReportNoInputFiles": true, - "canProduceDiagnostics": true, - "canWatchDirectoryOrFile": true, - "chainBundle": true, - "changeCompilerHostLikeToUseCache": true, - "classPrivateFieldGetHelper": true, - "classPrivateFieldInHelper": true, - "classPrivateFieldSetHelper": true, - "classicNameResolver": true, - "cleanExtendedConfigCache": true, - "clearSharedExtendedConfigFileWatcher": true, - "clearTimeout": true, - "climbPastPropertyAccess": true, - "climbPastPropertyOrElementAccess": true, - "cloneCompilerOptions": true, - "closeFileWatcherOf": true, - "collectExternalModuleInfo": true, - "commonOptionsWithBuild": true, - "compareEmitHelpers": true, - "comparePatternKeys": true, - "compileOnSaveCommandLineOption": true, - "compilerOptionsDidYouMeanDiagnostics": true, - "compilerOptionsIndicateEsModules": true, - "computeCommonSourceDirectoryOfFilenames": true, - "computeSignature": true, - "computeSignatureWithDiagnostics": true, - "computeSuggestionDiagnostics": true, - "console": true, - "consumesNodeCoreModules": true, - "convertCompilerOptionsForTelemetry": true, - "convertCompilerOptionsFromJson": true, - "convertJsonOption": true, - "convertToObject": true, - "convertToObjectWorker": true, - "convertToOptionsWithAbsolutePaths": true, - "convertToTSConfig": true, - "convertTypeAcquisitionFromJson": true, - "copyComments": true, - "copyLeadingComments": true, - "copyTrailingAsLeadingComments": true, - "copyTrailingComments": true, - "createAbstractBuilder": true, - "createBindingHelper": true, - "createBuildInfo": true, - "createBuilderProgram": true, - "createBuilderProgramUsingProgramBuildInfo": true, - "createBuilderStatusReporter": true, - "createCacheWithRedirects": true, - "createCacheableExportInfoMap": true, - "createCachedDirectoryStructureHost": true, - "createClassifier": true, - "createCompilerDiagnosticForInvalidCustomType": true, - "createCompilerHost": true, - "createCompilerHostFromProgramHost": true, - "createCompilerHostWorker": true, - "createDiagnosticReporter": true, - "createDocumentPositionMapper": true, - "createDocumentRegistry": true, - "createDocumentRegistryInternal": true, - "createEmitAndSemanticDiagnosticsBuilderProgram": true, - "createEmitHelperFactory": true, - "createGetSourceFile": true, - "createGetSymbolAccessibilityDiagnosticForNode": true, - "createGetSymbolAccessibilityDiagnosticForNodeName": true, - "createGetSymbolWalker": true, - "createIncrementalCompilerHost": true, - "createIncrementalProgram": true, - "createModeAwareCache": true, - "createModeAwareCacheKey": true, - "createModuleResolutionCache": true, - "createModuleResolutionLoader": true, - "createModuleSpecifierResolutionHost": true, - "createOptionNameMap": true, - "createOverload": true, - "createPackageJsonImportFilter": true, - "createPackageJsonInfo": true, - "createParenthesizerRules": true, - "createPatternMatcher": true, - "createPrependNodes": true, - "createPrinter": true, - "createPrinterWithDefaults": true, - "createPrinterWithRemoveComments": true, - "createPrinterWithRemoveCommentsNeverAsciiEscape": true, - "createPrinterWithRemoveCommentsOmitTrailingSemicolon": true, - "createProgram": true, - "createProgramHost": true, - "createRedirectedBuilderProgram": true, - "createResolutionCache": true, - "createRuntimeTypeSerializer": true, - "createSemanticDiagnosticsBuilderProgram": true, - "createSolutionBuilder": true, - "createSolutionBuilderHost": true, - "createSolutionBuilderWithWatch": true, - "createSolutionBuilderWithWatchHost": true, - "createSourceMapGenerator": true, - "createSuperAccessVariableStatement": true, - "createSystemWatchFunctions": true, - "createTextChange": true, - "createTextChangeFromStartLength": true, - "createTextRangeFromNode": true, - "createTextRangeFromSpan": true, - "createTextSpanFromNode": true, - "createTextSpanFromRange": true, - "createTextSpanFromStringLiteralLikeContent": true, - "createTypeChecker": true, - "createTypeReferenceDirectiveResolutionCache": true, - "createTypeReferenceResolutionLoader": true, - "createWatchCompilerHost2": true, - "createWatchCompilerHostOfConfigFile": true, - "createWatchCompilerHostOfFilesAndCompilerOptions": true, - "createWatchFactory": true, - "createWatchHost": true, - "createWatchProgram": true, - "createWatchStatusReporter": true, - "createWriteFileMeasuringIO": true, - "decodeMappings": true, - "decorateHelper": true, - "defaultIncludeSpec": true, - "defaultInitCompilerOptions": true, - "define": true, - "diagnosticToString": true, - "displayPart": true, - "disposeEmitNodes": true, - "document": true, - "documentSpansEqual": true, - "dumpTracingLegend": true, - "emitFiles": true, - "emitFilesAndReportErrors": true, - "emitFilesAndReportErrorsAndGetExitStatus": true, - "emitSkippedWithNoDiagnostics": true, - "emitUsingBuildInfo": true, - "emptyOptions": true, - "esDecorateHelper": true, - "explainFiles": true, - "explainIfFileIsRedirectAndImpliedFormat": true, - "exportStarHelper": true, - "extendsHelper": true, - "fileIncludeReasonToDiagnostics": true, - "filterSemanticDiagnostics": true, - "findChildOfKind": true, - "findConfigFile": true, - "findContainingList": true, - "findDiagnosticForNode": true, - "findFirstNonJsxWhitespaceToken": true, - "findListItemInfo": true, - "findModifier": true, - "findNextToken": true, - "findPackageJson": true, - "findPackageJsons": true, - "findPrecedingMatchingToken": true, - "findPrecedingToken": true, - "findSuperStatementIndex": true, - "findTokenOnLeftOfPosition": true, - "firstOrOnly": true, - "fixupCompilerOptions": true, - "flattenDestructuringAssignment": true, - "flattenDestructuringBinding": true, - "flattenDiagnosticMessageText": true, - "forEachEmittedFile": true, - "forEachExternalModuleToImportFrom": true, - "forEachResolvedProjectReference": true, - "forEachUnique": true, - "formatColorAndReset": true, - "formatDiagnostic": true, - "formatDiagnostics": true, - "formatDiagnosticsWithColorAndContext": true, - "formatLocation": true, - "generateDjb2Hash": true, - "generateTSConfig": true, - "generatorHelper": true, - "getAdjustedReferenceLocation": true, - "getAdjustedRenameLocation": true, - "getAllDecoratorsOfClass": true, - "getAllDecoratorsOfClassElement": true, - "getAllProjectOutputs": true, - "getAllUnscopedEmitHelpers": true, - "getAutomaticTypeDirectiveNames": true, - "getBuildInfo": true, - "getBuildInfoFileVersionMap": true, - "getBuildInfoText": true, - "getBuildOrderFromAnyBuildOrder": true, - "getBuilderCreationParameters": true, - "getBuilderFileEmit": true, - "getCommentRange": true, - "getCommonSourceDirectory": true, - "getCommonSourceDirectoryOfConfig": true, - "getCompilerOptionsDiffValue": true, - "getConditions": true, - "getConfigFileParsingDiagnostics": true, - "getConstantValue": true, - "getContainerNode": true, - "getContextualTypeFromParent": true, - "getContextualTypeFromParentOrAncestorTypeNode": true, - "getCurrentTime": true, - "getDeclarationDiagnostics": true, - "getDefaultExportInfoWorker": true, - "getDefaultFormatCodeSettings": true, - "getDefaultLikeExportInfo": true, - "getDiagnosticText": true, - "getDiagnosticsWithinSpan": true, - "getDocumentPositionMapper": true, - "getEditsForFileRename": true, - "getEffectiveTypeRoots": true, - "getEmitHelpers": true, - "getEncodedSemanticClassifications": true, - "getEncodedSyntacticClassifications": true, - "getEntrypointsFromPackageJsonInfo": true, - "getErrorCountForSummary": true, - "getErrorSummaryText": true, - "getExportInfoMap": true, - "getExportNeedsImportStarHelper": true, - "getFallbackOptions": true, - "getFileEmitOutput": true, - "getFileNamesFromConfigSpecs": true, - "getFileWatcherEventKind": true, - "getFilesInErrorForSummary": true, - "getFirstNonSpaceCharacterPosition": true, - "getFirstProjectOutput": true, - "getFixableErrorSpanExpression": true, - "getFormatCodeSettingsForWriting": true, - "getIdentifierAutoGenerate": true, - "getIdentifierGeneratedImportReference": true, - "getIdentifierTypeArguments": true, - "getImpliedNodeFormatForFile": true, - "getImpliedNodeFormatForFileWorker": true, - "getImportNeedsImportDefaultHelper": true, - "getImportNeedsImportStarHelper": true, - "getKeyForCompilerOptions": true, - "getLineInfo": true, - "getLineStartPositionForPosition": true, - "getLocaleTimeString": true, - "getMappedContextSpan": true, - "getMappedDocumentSpan": true, - "getMappedLocation": true, - "getMatchedFileSpec": true, - "getMatchedIncludeSpec": true, - "getMeaningFromDeclaration": true, - "getMeaningFromLocation": true, - "getModeForFileReference": true, - "getModeForResolutionAtIndex": true, - "getModeForUsageLocation": true, - "getModifiedTime": true, - "getModuleInstanceState": true, - "getModuleNameStringLiteralAt": true, - "getModuleSpecifierResolverHost": true, - "getNameForExportedSymbol": true, - "getNameFromPropertyName": true, - "getNameOfCompilerOptionValue": true, - "getNamesForExportedSymbol": true, - "getNavigateToItems": true, - "getNavigationBarItems": true, - "getNavigationTree": true, - "getNewLineKind": true, - "getNewLineOrDefaultFromHost": true, - "getNodeId": true, - "getNodeKind": true, - "getNodeModifiers": true, - "getNonAssignmentOperatorForCompoundAssignment": true, - "getOptionFromName": true, - "getOptionsNameMap": true, - "getOrCreateEmitNode": true, - "getOriginalNodeId": true, - "getOutputDeclarationFileName": true, - "getOutputExtension": true, - "getOutputFileNames": true, - "getOutputPathsFor": true, - "getOutputPathsForBundle": true, - "getPackageJsonInfo": true, - "getPackageJsonTypesVersionsPaths": true, - "getPackageJsonsVisibleToFile": true, - "getPackageNameFromTypesPackageName": true, - "getPackageScopeForPath": true, - "getParentNodeInSpan": true, - "getParsedCommandLineOfConfigFile": true, - "getPathUpdater": true, - "getPendingEmitKind": true, - "getPossibleGenericSignatures": true, - "getPossibleTypeArgumentsInfo": true, - "getPreEmitDiagnostics": true, - "getPrecedingNonSpaceCharacterPosition": true, - "getPrivateIdentifier": true, - "getProperties": true, - "getPropertySymbolFromBindingElement": true, - "getQuoteFromPreference": true, - "getQuotePreference": true, - "getRefactorContextSpan": true, - "getReferencedFileLocation": true, - "getRenameLocation": true, - "getReplacementSpanForContextToken": true, - "getResolutionDiagnostic": true, - "getResolutionModeOverrideForClause": true, - "getScriptKind": true, - "getScriptTargetFeatures": true, - "getSemanticClassifications": true, - "getSnapshotText": true, - "getSnippetElement": true, - "getSourceFileVersionAsHashFromText": true, - "getSourceMapRange": true, - "getSourceMapper": true, - "getStartsOnNewLine": true, - "getStaticPropertiesAndClassStaticBlock": true, - "getSuperCallFromStatement": true, - "getSwitchedType": true, - "getSymbolId": true, - "getSymbolTarget": true, - "getSyntacticClassifications": true, - "getSynthesizedDeepClone": true, - "getSynthesizedDeepCloneWithReplacements": true, - "getSynthesizedDeepClones": true, - "getSynthesizedDeepClonesWithReplacements": true, - "getSyntheticLeadingComments": true, - "getSyntheticTrailingComments": true, - "getTargetLabel": true, - "getTemporaryModuleResolutionState": true, - "getTokenAtPosition": true, - "getTokenSourceMapRange": true, - "getTouchingPropertyName": true, - "getTouchingToken": true, - "getTransformers": true, - "getTsBuildInfoEmitOutputFilePath": true, - "getTypeArgumentOrTypeParameterList": true, - "getTypeKeywordOfTypeOnlyImport": true, - "getTypeNode": true, - "getTypeNodeIfAccessible": true, - "getTypesPackageName": true, - "getUniqueName": true, - "getUniqueSymbolId": true, - "getWatchErrorSummaryDiagnosticMessage": true, - "getWatchFactory": true, - "handleNoEmitOptions": true, - "hasChildOfKind": true, - "hasDocComment": true, - "hasIndexSignature": true, - "hasPropertyAccessExpressionWithName": true, - "helperString": true, - "identitySourceMapConsumer": true, - "ignoreSourceNewlines": true, - "ignoredPaths": true, - "importDefaultHelper": true, - "importStarHelper": true, - "inferredTypesContainingFile": true, - "insertImports": true, - "inverseJsxOptionMap": true, - "isAccessibilityModifier": true, - "isApplicableVersionedTypesKey": true, - "isArgumentExpressionOfElementAccess": true, - "isArrayLiteralOrObjectLiteralDestructuringPattern": true, - "isBuildInfoFile": true, - "isBuilderProgram2": true, - "isCallExpressionTarget": true, - "isCallOrNewExpressionTarget": true, - "isCallToHelper": true, - "isCircularBuildOrder": true, - "isComment": true, - "isCompoundAssignment": true, - "isDecoratorTarget": true, - "isDeprecatedDeclaration": true, - "isDiagnosticWithLocation": true, - "isEmittedFileOfProgram": true, - "isEqualityOperatorKind": true, - "isExcludedFile": true, - "isExclusivelyTypeOnlyImportOrExport": true, - "isExportsOrModuleExportsOrAlias": true, - "isExpressionOfExternalModuleImportEqualsDeclaration": true, - "isExternalModuleSymbol": true, - "isFirstDeclarationOfSymbolParameter": true, - "isFixablePromiseHandler": true, - "isGlobalDeclaration": true, - "isIgnoredFileFromWildCardWatching": true, - "isImportOrExportSpecifierName": true, - "isImportableFile": true, - "isInComment": true, - "isInJSXText": true, - "isInNonReferenceComment": true, - "isInReferenceComment": true, - "isInRightSideOfInternalImportEqualsDeclaration": true, - "isInString": true, - "isInTemplateString": true, - "isInitializedProperty": true, - "isInsideJsxElement": true, - "isInsideJsxElementOrAttribute": true, - "isInsideNodeModules": true, - "isInsideTemplateLiteral": true, - "isInstantiatedModule": true, - "isInternalDeclaration": true, - "isJsxOpeningLikeElementTagName": true, - "isJumpStatementTarget": true, - "isLabelName": true, - "isLabelOfLabeledStatement": true, - "isLiteralNameOfPropertyDeclarationOrIndexAccess": true, - "isModuleSpecifierLike": true, - "isNameOfFunctionDeclaration": true, - "isNameOfModuleDeclaration": true, - "isNewExpressionTarget": true, - "isNonGlobalDeclaration": true, - "isNonStaticMethodOrAccessorWithPrivateName": true, - "isObjectBindingElementWithoutPropertyName": true, - "isPossiblyTypeArgumentPosition": true, - "isProgramBundleEmitBuildInfo": true, - "isProgramUptoDate": true, - "isPunctuation": true, - "isRawSourceMap": true, - "isReferenceFileLocation": true, - "isReferencedFile": true, - "isReturnStatementWithFixablePromiseHandler": true, - "isRightSideOfPropertyAccess": true, - "isRightSideOfQualifiedName": true, - "isSimpleCopiableExpression": true, - "isSimpleInlineableExpression": true, - "isSourceFileFromLibrary": true, - "isSourceMapping": true, - "isStringAndEmptyAnonymousObjectIntersection": true, - "isStringLiteralOrTemplate": true, - "isStringOrRegularExpressionOrTemplateLiteral": true, - "isTagName": true, - "isTaggedTemplateTag": true, - "isTextWhiteSpaceLike": true, - "isThis": true, - "isTraceEnabled": true, - "isTypeKeyword": true, - "isTypeKeywordToken": true, - "isTypeKeywordTokenOrIdentifier": true, - "jsxModeNeedsExplicitImport": true, - "keywordPart": true, - "libMap": true, - "libs": true, - "lineBreakPart": true, - "linkNamePart": true, - "linkPart": true, - "linkTextPart": true, - "listFiles": true, - "loadModuleFromGlobalCache": true, - "loadWithModeAwareCache": true, - "location": true, - "makeImport": true, - "makeImportIfNecessary": true, - "makeStringLiteral": true, - "mangleScopedPackageName": true, - "mapOneOrMany": true, - "mapToDisplayParts": true, - "matchesExclude": true, - "metadataHelper": true, - "missingFileModifiedTime": true, - "moduleOptionDeclaration": true, - "moduleResolutionNameAndModeGetter": true, - "moduleResolutionOptionDeclarations": true, - "moduleResolutionUsesNodeModules": true, - "moveEmitHelpers": true, - "moveSyntheticComments": true, - "navigator": true, - "needsParentheses": true, - "newCaseClauseTracker": true, - "newPrivateEnvironment": true, - "noEmitNotification": true, - "noEmitSubstitution": true, - "noTransformers": true, - "nodeModuleNameResolver": true, - "nodeModulesPathPart": true, - "nodeNextJsonConfigResolver": true, - "nodeOverlapsWithStartEnd": true, - "nodeSeenTracker": true, - "nodeToDisplayParts": true, - "noopFileWatcher": true, - "notImplementedResolver": true, - "nullNodeConverters": true, - "nullTransformationContext": true, - "onProfilerEvent": true, - "operatorPart": true, - "optionDeclarations": true, - "optionMapToObject": true, - "optionsAffectingProgramStructure": true, - "optionsForBuild": true, - "optionsForWatch": true, - "paramHelper": true, - "parameterNamePart": true, - "parseBuildCommand": true, - "parseCommandLine": true, - "parseCommandLineWorker": true, - "parseConfigFileTextToJson": true, - "parseConfigFileWithSystem": true, - "parseConfigHostFromCompilerHostLike": true, - "parseCustomTypeOption": true, - "parseJsonConfigFileContent": true, - "parseJsonSourceFileConfigFileContent": true, - "parseListTypeOption": true, - "parseNodeModuleFromPath": true, - "parsePackageName": true, - "patchWriteFileEnsuringDirectory": true, - "pathContainsNodeModules": true, - "performIncrementalCompilation": true, - "performance": true, - "plainJSErrors": true, - "positionBelongsToNode": true, - "positionIsASICandidate": true, - "preProcessFile": true, - "probablyUsesSemicolons": true, - "process": true, - "processTaggedTemplateExpression": true, - "programContainsEsModules": true, - "programContainsModules": true, - "propKeyHelper": true, - "propertyNamePart": true, - "punctuationPart": true, - "queueMicrotask": true, - "quote": true, - "quotePreferenceFromString": true, - "rangeContainsPosition": true, - "rangeContainsPositionExclusive": true, - "rangeContainsRange": true, - "rangeContainsRangeExclusive": true, - "rangeContainsStartEnd": true, - "rangeOverlapsWithStartEnd": true, - "readBuilderProgram": true, - "readConfigFile": true, - "readHelper": true, - "readJsonConfigFile": true, - "realizeDiagnostics": true, - "removeAllComments": true, - "removeEmitHelper": true, - "removeIgnoredPath": true, - "removeOptionality": true, - "repeatString": true, - "resolveConfigFileProjectName": true, - "resolveJSModule": true, - "resolveModuleName": true, - "resolveModuleNameFromCache": true, - "resolvePackageNameToPackageJson": true, - "resolveProjectReferencePath": true, - "resolveTripleslashReference": true, - "resolveTypeReferenceDirective": true, - "restHelper": true, - "returnNoopFileWatcher": true, - "returnsPromise": true, - "runInitializersHelper": true, - "sameMapping": true, - "screenStartingMessageCodes": true, - "semanticDiagnosticsOptionDeclarations": true, - "serializeCompilerOptions": true, - "setCommentRange": true, - "setConfigFileInOptions": true, - "setConstantValue": true, - "setEmitFlags": true, - "setFunctionNameHelper": true, - "setGetSourceFileAsHashVersioned": true, - "setIdentifierAutoGenerate": true, - "setIdentifierGeneratedImportReference": true, - "setIdentifierTypeArguments": true, - "setImmediate": true, - "setInternalEmitFlags": true, - "setModuleDefaultHelper": true, - "setPrivateIdentifier": true, - "setSnippetElement": true, - "setSourceMapRange": true, - "setStackTraceLimit": true, - "setStartsOnNewLine": true, - "setSyntheticLeadingComments": true, - "setSyntheticTrailingComments": true, - "setSys": true, - "setSysLog": true, - "setTimeout": true, - "setTokenSourceMapRange": true, - "setTypeNode": true, - "shouldAllowImportingTsExtension": true, - "shouldUseUriStyleNodeCoreModules": true, - "signatureHasLiteralTypes": true, - "signatureHasRestParameter": true, - "signatureToDisplayParts": true, - "skipConstraint": true, - "sourceFileAffectingCompilerOptions": true, - "sourceMapCommentRegExp": true, - "sourceMapCommentRegExpDontCareLineStart": true, - "spacePart": true, - "spreadArrayHelper": true, - "startEndContainsRange": true, - "startEndOverlapsWithStartEnd": true, - "startTracing": true, - "startsWithUnderscore": true, - "stringContainsAt": true, - "suppressLeadingAndTrailingTrivia": true, - "suppressLeadingTrivia": true, - "suppressTrailingTrivia": true, - "symbolEscapedNameNoDefault": true, - "symbolNameNoDefault": true, - "symbolPart": true, - "symbolToDisplayParts": true, - "syntaxMayBeASICandidate": true, - "syntaxRequiresTrailingSemicolonOrASI": true, - "sysLog": true, - "targetOptionDeclaration": true, - "templateObjectHelper": true, - "testFormatSettings": true, - "textOrKeywordPart": true, - "textPart": true, - "textSpansEqual": true, - "toBuilderFileEmit": true, - "toBuilderStateFileInfoForMultiEmit": true, - "toProgramEmitPending": true, - "trace": true, - "tracingEnabled": true, - "transform": true, - "transformClassFields": true, - "transformDeclarations": true, - "transformECMAScriptModule": true, - "transformES2015": true, - "transformES2016": true, - "transformES2017": true, - "transformES2018": true, - "transformES2019": true, - "transformES2020": true, - "transformES2021": true, - "transformES5": true, - "transformESDecorators": true, - "transformESNext": true, - "transformGenerators": true, - "transformJsx": true, - "transformLegacyDecorators": true, - "transformModule": true, - "transformNodeModule": true, - "transformNodes": true, - "transformSystemModule": true, - "transformTypeScript": true, - "transpile": true, - "transpileModule": true, - "transpileOptionValueCompilerOptions": true, - "tryAndIgnoreErrors": true, - "tryDirectoryExists": true, - "tryFileExists": true, - "tryGetDirectories": true, - "tryGetSourceMappingURL": true, - "tryIOAndConsumeErrors": true, - "tryParseRawSourceMap": true, - "tryReadDirectory": true, - "tryReadFile": true, - "ts_BreakpointResolver_exports": true, - "ts_CallHierarchy_exports": true, - "ts_Completions_exports": true, - "ts_FindAllReferences_exports": true, - "ts_GoToDefinition_exports": true, - "ts_InlayHints_exports": true, - "ts_JsDoc_exports": true, - "ts_JsTyping_exports": true, - "ts_NavigateTo_exports": true, - "ts_NavigationBar_exports": true, - "ts_OrganizeImports_exports": true, - "ts_OutliningElementsCollector_exports": true, - "ts_Rename_exports": true, - "ts_SignatureHelp_exports": true, - "ts_SmartSelectionRange_exports": true, - "ts_SymbolDisplay_exports": true, - "ts_classifier_exports": true, - "ts_codefix_exports": true, - "ts_formatting_exports": true, - "ts_moduleSpecifiers_exports": true, - "ts_performance_exports": true, - "ts_refactor_exports": true, - "ts_server_exports": true, - "ts_textChanges_exports": true, - "typeAcquisitionDeclarations": true, - "typeAliasNamePart": true, - "typeKeywords": true, - "typeParameterNamePart": true, - "typeReferenceResolutionNameAndModeGetter": true, - "typeToDisplayParts": true, - "unchangedPollThresholds": true, - "unmangleScopedPackageName": true, - "updateErrorForNoInputFiles": true, - "updateMissingFilePathsWatch": true, - "updatePackageJsonWatch": true, - "updateResolutionField": true, - "updateSharedExtendedConfigFileWatcher": true, - "updateWatchingWildcardDirectories": true, - "valuesHelper": true, - "visitArray": true, - "visitCommaListElements": true, - "visitEachChild": true, - "visitFunctionBody": true, - "visitIterationBody": true, - "visitLexicalEnvironment": true, - "visitNode": true, - "visitNodes2": true, - "visitParameterList": true, - "walkUpLexicalEnvironments": true, - "whitespaceOrMapCommentRegExp": true, - "zipToModeAwareCache": true - } - }, "prettier-eslint>loglevel-colored-level-prefix>chalk>has-ansi": { "packages": { "prettier-eslint>loglevel-colored-level-prefix>chalk>has-ansi>ansi-regex": true @@ -8838,6 +8094,13 @@ "typescript": true } }, + "tsx>fsevents": { + "globals": { + "console.assert": true, + "process.platform": true + }, + "native": true + }, "typescript": { "builtin": { "buffer.Buffer": true, diff --git a/package.json b/package.json index c12b8b40cdfb..af336251bcd4 100644 --- a/package.json +++ b/package.json @@ -582,7 +582,7 @@ "eslint-plugin-jsdoc": "41.1.2", "eslint-plugin-mocha": "^10.1.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.23.1", "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-storybook": "^0.6.15", @@ -635,8 +635,8 @@ "postcss-discard-font-face": "^3.0.0", "postcss-loader": "^8.1.1", "postcss-rtlcss": "^4.0.9", - "prettier": "^2.7.1", - "prettier-eslint": "^15.0.1", + "prettier": "^3", + "prettier-eslint": "^16", "prettier-plugin-sort-json": "^1.0.0", "process": "^0.11.10", "pumpify": "^2.0.1", diff --git a/yarn.lock b/yarn.lock index 65dc70847c4e..7f14bf88358c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7292,6 +7292,13 @@ __metadata: languageName: node linkType: hard +"@pkgr/core@npm:^0.1.0": + version: 0.1.1 + resolution: "@pkgr/core@npm:0.1.1" + checksum: 10/6f25fd2e3008f259c77207ac9915b02f1628420403b2630c92a07ff963129238c9262afc9e84344c7a23b5cc1f3965e2cd17e3798219f5fd78a63d144d3cceba + languageName: node + linkType: hard + "@playwright/test@npm:^1.39.0": version: 1.39.0 resolution: "@playwright/test@npm:1.39.0" @@ -10623,7 +10630,7 @@ __metadata: languageName: node linkType: hard -"@types/eslint@npm:*, @types/eslint@npm:^8.4.2, @types/eslint@npm:^8.44.7": +"@types/eslint@npm:*, @types/eslint@npm:^8.44.7": version: 8.56.11 resolution: "@types/eslint@npm:8.56.11" dependencies: @@ -11163,7 +11170,7 @@ __metadata: languageName: node linkType: hard -"@types/prettier@npm:^2.6.0, @types/prettier@npm:^2.7.2": +"@types/prettier@npm:^2.7.2": version: 2.7.3 resolution: "@types/prettier@npm:2.7.3" checksum: 10/cda84c19acc3bf327545b1ce71114a7d08efbd67b5030b9e8277b347fa57b05178045f70debe1d363ff7efdae62f237260713aafc2d7217e06fc99b048a88497 @@ -11657,20 +11664,21 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.10.0": - version: 5.62.0 - resolution: "@typescript-eslint/parser@npm:5.62.0" +"@typescript-eslint/parser@npm:^6.7.5": + version: 6.21.0 + resolution: "@typescript-eslint/parser@npm:6.21.0" dependencies: - "@typescript-eslint/scope-manager": "npm:5.62.0" - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/typescript-estree": "npm:5.62.0" + "@typescript-eslint/scope-manager": "npm:6.21.0" + "@typescript-eslint/types": "npm:6.21.0" + "@typescript-eslint/typescript-estree": "npm:6.21.0" + "@typescript-eslint/visitor-keys": "npm:6.21.0" debug: "npm:^4.3.4" peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/b6ca629d8f4e6283ff124501731cc886703eb4ce2c7d38b3e4110322ea21452b9d9392faf25be6bd72f54b89de7ffc72a40d9b159083ac54345a3d04b4fa5394 + checksum: 10/4d51cdbc170e72275efc5ef5fce48a81ec431e4edde8374f4d0213d8d370a06823e1a61ae31d502a5f1b0d1f48fc4d29a1b1b5c2dcf809d66d3872ccf6e46ac7 languageName: node linkType: hard @@ -11702,13 +11710,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/scope-manager@npm:5.62.0" +"@typescript-eslint/scope-manager@npm:6.21.0": + version: 6.21.0 + resolution: "@typescript-eslint/scope-manager@npm:6.21.0" dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - checksum: 10/e827770baa202223bc0387e2fd24f630690809e460435b7dc9af336c77322290a770d62bd5284260fa881c86074d6a9fd6c97b07382520b115f6786b8ed499da + "@typescript-eslint/types": "npm:6.21.0" + "@typescript-eslint/visitor-keys": "npm:6.21.0" + checksum: 10/fe91ac52ca8e09356a71dc1a2f2c326480f3cccfec6b2b6d9154c1a90651ab8ea270b07c67df5678956c3bbf0bbe7113ab68f68f21b20912ea528b1214197395 languageName: node linkType: hard @@ -11753,6 +11761,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:6.21.0": + version: 6.21.0 + resolution: "@typescript-eslint/types@npm:6.21.0" + checksum: 10/e26da86d6f36ca5b6ef6322619f8ec55aabcd7d43c840c977ae13ae2c964c3091fc92eb33730d8be08927c9de38466c5323e78bfb270a9ff1d3611fe821046c5 + languageName: node + linkType: hard + "@typescript-eslint/types@npm:7.11.0": version: 7.11.0 resolution: "@typescript-eslint/types@npm:7.11.0" @@ -11778,21 +11793,22 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.62.0, @typescript-eslint/typescript-estree@npm:^5.59.5": - version: 5.62.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" +"@typescript-eslint/typescript-estree@npm:6.21.0": + version: 6.21.0 + resolution: "@typescript-eslint/typescript-estree@npm:6.21.0" dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" + "@typescript-eslint/types": "npm:6.21.0" + "@typescript-eslint/visitor-keys": "npm:6.21.0" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" + minimatch: "npm:9.0.3" + semver: "npm:^7.5.4" + ts-api-utils: "npm:^1.0.1" peerDependenciesMeta: typescript: optional: true - checksum: 10/06c975eb5f44b43bd19fadc2e1023c50cf87038fe4c0dd989d4331c67b3ff509b17fa60a3251896668ab4d7322bdc56162a9926971218d2e1a1874d2bef9a52e + checksum: 10/b32fa35fca2a229e0f5f06793e5359ff9269f63e9705e858df95d55ca2cd7fdb5b3e75b284095a992c48c5fc46a1431a1a4b6747ede2dd08929dc1cbacc589b8 languageName: node linkType: hard @@ -11815,6 +11831,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:^5.59.5": + version: 5.62.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" + dependencies: + "@typescript-eslint/types": "npm:5.62.0" + "@typescript-eslint/visitor-keys": "npm:5.62.0" + debug: "npm:^4.3.4" + globby: "npm:^11.1.0" + is-glob: "npm:^4.0.3" + semver: "npm:^7.3.7" + tsutils: "npm:^3.21.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/06c975eb5f44b43bd19fadc2e1023c50cf87038fe4c0dd989d4331c67b3ff509b17fa60a3251896668ab4d7322bdc56162a9926971218d2e1a1874d2bef9a52e + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:7.11.0": version: 7.11.0 resolution: "@typescript-eslint/utils@npm:7.11.0" @@ -11867,6 +11901,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:6.21.0": + version: 6.21.0 + resolution: "@typescript-eslint/visitor-keys@npm:6.21.0" + dependencies: + "@typescript-eslint/types": "npm:6.21.0" + eslint-visitor-keys: "npm:^3.4.1" + checksum: 10/30422cdc1e2ffad203df40351a031254b272f9c6f2b7e02e9bfa39e3fc2c7b1c6130333b0057412968deda17a3a68a578a78929a8139c6acef44d9d841dc72e1 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:7.11.0": version: 7.11.0 resolution: "@typescript-eslint/visitor-keys@npm:7.11.0" @@ -18627,18 +18671,23 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:^4.2.1": - version: 4.2.1 - resolution: "eslint-plugin-prettier@npm:4.2.1" +"eslint-plugin-prettier@npm:^5.2.1": + version: 5.2.1 + resolution: "eslint-plugin-prettier@npm:5.2.1" dependencies: prettier-linter-helpers: "npm:^1.0.0" + synckit: "npm:^0.9.1" peerDependencies: - eslint: ">=7.28.0" - prettier: ">=2.0.0" + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + eslint-config-prettier: "*" + prettier: ">=3.0.0" peerDependenciesMeta: + "@types/eslint": + optional: true eslint-config-prettier: optional: true - checksum: 10/d387f85dd1bfcb6bc6b794845fee6afb9ebb2375653de6bcde6e615892fb97f85121a7c012a4651b181fc09953bdf54c9bc70cab7ad297019d89ae87dd007e28 + checksum: 10/10ddf68215237e327af09a47adab4c63f3885fda4fb28c4c42d1fc5f47d8a0cc45df6484799360ff1417a0aa3c77c3aaac49d7e9dfd145557b17e2d7ecc2a27c languageName: node linkType: hard @@ -18706,7 +18755,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.0.0, eslint-scope@npm:^7.2.2": +"eslint-scope@npm:^7.1.1, eslint-scope@npm:^7.2.2": version: 7.2.2 resolution: "eslint-scope@npm:7.2.2" dependencies: @@ -18757,7 +18806,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.1.0, eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b @@ -18883,7 +18932,7 @@ __metadata: languageName: node linkType: hard -"espree@npm:9.6.1, espree@npm:^9.0.0, espree@npm:^9.6.0, espree@npm:^9.6.1": +"espree@npm:9.6.1, espree@npm:^9.3.1, espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" dependencies: @@ -26991,7 +27040,7 @@ __metadata: eslint-plugin-jsdoc: "npm:41.1.2" eslint-plugin-mocha: "npm:^10.1.0" eslint-plugin-node: "npm:^11.1.0" - eslint-plugin-prettier: "npm:^4.2.1" + eslint-plugin-prettier: "npm:^5.2.1" eslint-plugin-react: "npm:^7.23.1" eslint-plugin-react-hooks: "npm:^4.2.0" eslint-plugin-storybook: "npm:^0.6.15" @@ -27066,8 +27115,8 @@ __metadata: postcss-discard-font-face: "npm:^3.0.0" postcss-loader: "npm:^8.1.1" postcss-rtlcss: "npm:^4.0.9" - prettier: "npm:^2.7.1" - prettier-eslint: "npm:^15.0.1" + prettier: "npm:^3" + prettier-eslint: "npm:^16" prettier-plugin-sort-json: "npm:^1.0.0" process: "npm:^0.11.10" promise-to-callback: "npm:^1.0.0" @@ -27712,6 +27761,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:9.0.3": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/c81b47d28153e77521877649f4bab48348d10938df9e8147a58111fe00ef89559a2938de9f6632910c4f7bf7bb5cd81191a546167e58d357f0cfb1e18cecc1c5 + languageName: node + linkType: hard + "minimatch@npm:^9.0.4": version: 9.0.4 resolution: "minimatch@npm:9.0.4" @@ -30422,25 +30480,31 @@ __metadata: languageName: node linkType: hard -"prettier-eslint@npm:^15.0.1": - version: 15.0.1 - resolution: "prettier-eslint@npm:15.0.1" +"prettier-eslint@npm:^16": + version: 16.3.0 + resolution: "prettier-eslint@npm:16.3.0" dependencies: - "@types/eslint": "npm:^8.4.2" - "@types/prettier": "npm:^2.6.0" - "@typescript-eslint/parser": "npm:^5.10.0" + "@typescript-eslint/parser": "npm:^6.7.5" common-tags: "npm:^1.4.0" dlv: "npm:^1.1.0" eslint: "npm:^8.7.0" indent-string: "npm:^4.0.0" lodash.merge: "npm:^4.6.0" loglevel-colored-level-prefix: "npm:^1.0.0" - prettier: "npm:^2.5.1" - pretty-format: "npm:^23.0.1" + prettier: "npm:^3.0.1" + pretty-format: "npm:^29.7.0" require-relative: "npm:^0.8.7" - typescript: "npm:^4.5.4" - vue-eslint-parser: "npm:^8.0.1" - checksum: 10/b5b813acd8016f5d85fcc05f638ac6915e705dfd08bf678a6a682e1ad7f7381d268502293fb107e868e5c3573684bf2c84e6149a419c3401577f6235ba22c334 + typescript: "npm:^5.2.2" + vue-eslint-parser: "npm:^9.1.0" + peerDependencies: + prettier-plugin-svelte: ^3.0.0 + svelte-eslint-parser: "*" + peerDependenciesMeta: + prettier-plugin-svelte: + optional: true + svelte-eslint-parser: + optional: true + checksum: 10/7b723c1b761d0ad5b4b3945b4df782c290e7a68cbfd86400ba039ce59fff85da7b59781de2dacea7054763da47ab52eff0357f9e0ae066fdd4c8d88390135360 languageName: node linkType: hard @@ -30464,7 +30528,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.5.1, prettier@npm:^2.7.1, prettier@npm:^2.8.0": +"prettier@npm:^2.8.0": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -30473,6 +30537,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^3, prettier@npm:^3.0.1": + version: 3.3.3 + resolution: "prettier@npm:3.3.3" + bin: + prettier: bin/prettier.cjs + checksum: 10/5beac1f30b5b40162532b8e2f7c3a4eb650910a2695e9c8512a62ffdc09dae93190c29db9107fa7f26d1b6c71aad3628ecb9b5de1ecb0911191099be109434d7 + languageName: node + linkType: hard + "pretty-error@npm:^4.0.0": version: 4.0.0 resolution: "pretty-error@npm:4.0.0" @@ -30483,16 +30556,6 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^23.0.1": - version: 23.6.0 - resolution: "pretty-format@npm:23.6.0" - dependencies: - ansi-regex: "npm:^3.0.0" - ansi-styles: "npm:^3.2.0" - checksum: 10/7fda1f30c374e24b4ff2ce1d517ecd42a25b0eb759e3289b04ca93d95d38e84a56fc240e76bdd90b0ac471e77088e543ac581223cafcb56e9be05c9d6ac10516 - languageName: node - linkType: hard - "pretty-format@npm:^26.6.2": version: 26.6.2 resolution: "pretty-format@npm:26.6.2" @@ -33556,7 +33619,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": +"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.6, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -35222,6 +35285,16 @@ __metadata: languageName: node linkType: hard +"synckit@npm:^0.9.1": + version: 0.9.2 + resolution: "synckit@npm:0.9.2" + dependencies: + "@pkgr/core": "npm:^0.1.0" + tslib: "npm:^2.6.2" + checksum: 10/d45c4288be9c0232343650643892a7edafb79152c0c08d7ae5d33ca2c296b67a0e15f8cb5c9153969612c4ea5cd5686297542384aab977db23cfa6653fe02027 + languageName: node + linkType: hard + "syntax-error@npm:^1.1.1": version: 1.4.0 resolution: "syntax-error@npm:1.4.0" @@ -35796,12 +35869,12 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^1.3.0": - version: 1.3.0 - resolution: "ts-api-utils@npm:1.3.0" +"ts-api-utils@npm:^1.0.1, ts-api-utils@npm:^1.3.0": + version: 1.4.0 + resolution: "ts-api-utils@npm:1.4.0" peerDependencies: typescript: ">=4.2.0" - checksum: 10/3ee44faa24410cd649b5c864e068d438aa437ef64e9e4a66a41646a6d3024d3097a695eeb3fb26ee364705d3cb9653a65756d009e6a53badb6066a5f447bf7ed + checksum: 10/b2020d5da55e28dc9dd32fb94730a4f6caefbd8e103029b6b6de5f15d18873067d734f64761c424c78ad1393a2b99d82b5a9fd34d663c12243acca7d3439090b languageName: node linkType: hard @@ -35915,10 +35988,10 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0": - version: 2.6.2 - resolution: "tslib@npm:2.6.2" - checksum: 10/bd26c22d36736513980091a1e356378e8b662ded04204453d353a7f34a4c21ed0afc59b5f90719d4ba756e581a162ecbf93118dc9c6be5acf70aa309188166ca +"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.6.2": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10/3e2e043d5c2316461cb54e5c7fe02c30ef6dccb3384717ca22ae5c6b5bc95232a6241df19c622d9c73b809bea33b187f6dbc73030963e29950c2141bc32a79f7 languageName: node linkType: hard @@ -36179,17 +36252,17 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^4.5.4": - version: 4.9.5 - resolution: "typescript@npm:4.9.5" +"typescript@npm:^5.0.4, typescript@npm:^5.2.2": + version: 5.6.3 + resolution: "typescript@npm:5.6.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/458f7220ab11e0fc191514cc41be1707645ec9a8c2d609448a448e18c522cef9646f58728f6811185a4c35613dacdf6c98cf8965c88b3541d0288c47291e4300 + checksum: 10/c328e418e124b500908781d9f7b9b93cf08b66bf5936d94332b463822eea2f4e62973bfb3b8a745fdc038785cb66cf59d1092bac3ec2ac6a3e5854687f7833f1 languageName: node linkType: hard -"typescript@npm:^5.0.4, typescript@npm:~5.4.5": +"typescript@npm:~5.4.5": version: 5.4.5 resolution: "typescript@npm:5.4.5" bin: @@ -36199,17 +36272,17 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^4.5.4#optional!builtin": - version: 4.9.5 - resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin::version=4.9.5&hash=289587" +"typescript@patch:typescript@npm%3A^5.0.4#optional!builtin, typescript@patch:typescript@npm%3A^5.2.2#optional!builtin": + version: 5.6.3 + resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=8c6c40" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/5659316360b5cc2d6f5931b346401fa534107b68b60179cf14970e27978f0936c1d5c46f4b5b8175f8cba0430f522b3ce355b4b724c0ea36ce6c0347fab25afd + checksum: 10/00504c01ee42d470c23495426af07512e25e6546bce7e24572e72a9ca2e6b2e9bea63de4286c3cfea644874da1467dcfca23f4f98f7caf20f8b03c0213bb6837 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.0.4#optional!builtin, typescript@patch:typescript@npm%3A~5.4.5#optional!builtin": +"typescript@patch:typescript@npm%3A~5.4.5#optional!builtin": version: 5.4.5 resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=5adc0c" bin: @@ -37372,20 +37445,20 @@ __metadata: languageName: node linkType: hard -"vue-eslint-parser@npm:^8.0.1": - version: 8.3.0 - resolution: "vue-eslint-parser@npm:8.3.0" +"vue-eslint-parser@npm:^9.1.0": + version: 9.4.3 + resolution: "vue-eslint-parser@npm:9.4.3" dependencies: - debug: "npm:^4.3.2" - eslint-scope: "npm:^7.0.0" - eslint-visitor-keys: "npm:^3.1.0" - espree: "npm:^9.0.0" + debug: "npm:^4.3.4" + eslint-scope: "npm:^7.1.1" + eslint-visitor-keys: "npm:^3.3.0" + espree: "npm:^9.3.1" esquery: "npm:^1.4.0" lodash: "npm:^4.17.21" - semver: "npm:^7.3.5" + semver: "npm:^7.3.6" peerDependencies: eslint: ">=6.0.0" - checksum: 10/75b7146da8ba9725d8872cb739bb83a2223f1deca1bbb166e15c156a25f854fdc32ad5d4840a5463c8380c1c44fbece04a621a367e69e5dfd520a2fe64dd23fa + checksum: 10/228e43f0067e5f1fa87a4192f355ebbb4a224f0c7e170b1fbd4205fdf42fe7b3c6820a7e467496a8174e51ba351bc9caed00389d05519206cfa1615cac44516c languageName: node linkType: hard From e9250c3b3abd1e3c36a4e1180faf2e0bf9c76f8a Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Thu, 21 Nov 2024 22:58:50 +0000 Subject: [PATCH 2/3] Update LavaMoat policies --- lavamoat/build-system/policy.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 4377c3210cb6..765d037a39ba 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -2040,8 +2040,7 @@ "chokidar>normalize-path": true, "chokidar>readdirp": true, "del>is-glob": true, - "eslint>glob-parent": true, - "tsx>fsevents": true + "eslint>glob-parent": true } }, "chokidar>anymatch": { @@ -8094,13 +8093,6 @@ "typescript": true } }, - "tsx>fsevents": { - "globals": { - "console.assert": true, - "process.platform": true - }, - "native": true - }, "typescript": { "builtin": { "buffer.Buffer": true, From 12a0599c47189399748e061c6b2fce001f450bba Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 21 Nov 2024 13:48:56 -1000 Subject: [PATCH 3/3] chore: lint fix for prettier v3 --- .../account-tracker-controller.test.ts | 2 +- .../controllers/decrypt-message.test.ts | 19 ++++---- .../controllers/encryption-public-key.test.ts | 4 +- .../permissions/background-api.test.js | 14 +++--- app/scripts/lib/state-utils.ts | 11 +++-- app/scripts/lib/transaction/util.ts | 5 +-- .../tx-verification-middleware.test.ts | 2 +- app/scripts/metamask-controller.js | 10 ++--- app/scripts/metamask-controller.test.js | 25 +++++------ .../services/data-deletion-service.test.ts | 10 ++--- app/scripts/services/data-deletion-service.ts | 6 +-- development/webpack/test/helpers.ts | 33 +++++++------- .../test/plugins.ManifestPlugin.test.ts | 8 ++-- shared/lib/error-utils.js | 5 +-- test/e2e/benchmark.js | 5 +-- test/e2e/flask/btc/common-btc.ts | 6 +-- test/e2e/flask/user-operations.spec.ts | 5 +-- test/e2e/lavamoat-stats.js | 5 +-- test/e2e/mv3-perf-stats/bundle-size.js | 5 +-- test/e2e/mv3-perf-stats/init-load-stats.js | 5 +-- test/e2e/mv3-stats.js | 5 +-- test/e2e/page-objects/pages/homepage.ts | 5 +-- .../onboarding-privacy-settings-page.ts | 6 +-- test/e2e/run-openrpc-api-test-coverage.ts | 5 +-- .../contract-interactions.spec.js | 5 +-- .../dapp-interactions/dapp-tx-edit.spec.js | 5 +-- .../failing-contract.spec.js | 10 ++--- .../tests/network/custom-rpc-history.spec.js | 10 ++--- .../privacy/account-tracker-api-usage.spec.ts | 20 ++++----- .../switchChain-watchAsset.spec.js | 5 +-- .../tests/settings/4byte-directory.spec.js | 10 ++--- test/e2e/tests/tokens/add-hide-token.spec.js | 10 ++--- .../tokens/custom-token-add-approve.spec.js | 25 +++++------ .../tokens/custom-token-send-transfer.spec.js | 10 ++--- .../tokens/increase-token-allowance.spec.js | 5 +-- .../tokens/nft/erc721-interaction.spec.js | 5 +-- test/e2e/tests/tokens/nft/remove-nft.spec.js | 5 +-- .../tokens/send-erc20-to-contract.spec.js | 5 +-- test/e2e/tests/transaction/send-eth.spec.js | 5 +-- test/e2e/user-actions-benchmark.js | 5 +-- .../transactions/alerts.test.tsx | 10 ++--- test/stub/networks.ts | 4 +- .../asset-list-control-bar.tsx | 2 +- .../app/name/name-details/name-details.tsx | 2 +- ui/helpers/utils/confirm-tx.util.ts | 18 +++++--- ui/helpers/utils/util.js | 2 +- ui/hooks/useName.ts | 2 +- ui/hooks/useShouldShowSpeedUp.js | 11 +++-- ui/hooks/useTokenBalances.ts | 45 +++++++++++-------- ui/hooks/useTokensWithFiltering.ts | 2 +- ui/pages/asset/components/asset-page.tsx | 2 +- .../components/chart/crosshair-plugin.ts | 2 +- .../components/confirm/footer/footer.test.tsx | 12 ++--- .../decoded-simulation/decoded-simulation.tsx | 2 +- .../components/confirm/nav/nav.test.tsx | 2 +- .../sortBalanceChanges.test.ts | 2 +- .../simulation-details/useBalanceChanges.ts | 2 +- .../hooks/useConfirmationAlertMetrics.ts | 2 +- .../networks-form/networks-form.tsx | 8 ++-- .../prepare-swap-page/prepare-swap-page.js | 4 +- ui/selectors/multichain.ts | 2 +- ui/selectors/nft.ts | 17 ++++--- ui/store/actions.ts | 5 +-- 63 files changed, 239 insertions(+), 267 deletions(-) diff --git a/app/scripts/controllers/account-tracker-controller.test.ts b/app/scripts/controllers/account-tracker-controller.test.ts index 7456244fc5a4..5bafeb2072f1 100644 --- a/app/scripts/controllers/account-tracker-controller.test.ts +++ b/app/scripts/controllers/account-tracker-controller.test.ts @@ -115,7 +115,7 @@ async function withController( ({ id: 'accountId', address: SELECTED_ADDRESS, - } as InternalAccount); + }) as InternalAccount; controllerMessenger.registerActionHandler( 'AccountsController:getSelectedAccount', getSelectedAccount || getSelectedAccountStub, diff --git a/app/scripts/controllers/decrypt-message.test.ts b/app/scripts/controllers/decrypt-message.test.ts index 848fe3f9986d..5b7fe5fedc95 100644 --- a/app/scripts/controllers/decrypt-message.test.ts +++ b/app/scripts/controllers/decrypt-message.test.ts @@ -40,7 +40,7 @@ const createMessengerMock = () => call: jest.fn(), // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - } as any as jest.Mocked); + }) as any as jest.Mocked; const createDecryptMessageManagerMock = () => ({ @@ -61,7 +61,7 @@ const createDecryptMessageManagerMock = () => }, // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - } as any as jest.Mocked); + }) as any as jest.Mocked; describe('DecryptMessageController', () => { class MockDecryptMessageController extends DecryptMessageController { @@ -178,9 +178,8 @@ describe('DecryptMessageController', () => { ); getStateMock.mockReturnValue(mockExtState); - const result = await decryptMessageController.decryptMessage( - messageToDecrypt, - ); + const result = + await decryptMessageController.decryptMessage(messageToDecrypt); expect(decryptMessageManagerMock.approveMessage).toBeCalledTimes(1); expect(decryptMessageManagerMock.approveMessage).toBeCalledWith( @@ -248,9 +247,8 @@ describe('DecryptMessageController', () => { ); getStateMock.mockReturnValue(mockExtState); - const result = await decryptMessageController.decryptMessageInline( - messageToDecrypt, - ); + const result = + await decryptMessageController.decryptMessageInline(messageToDecrypt); expect(decryptMessageManagerMock.setResult).toBeCalledTimes(1); expect(decryptMessageManagerMock.setResult).toBeCalledWith( @@ -277,9 +275,8 @@ describe('DecryptMessageController', () => { ); getStateMock.mockReturnValue(mockExtState); - const result = await decryptMessageController.cancelDecryptMessage( - messageIdMock, - ); + const result = + await decryptMessageController.cancelDecryptMessage(messageIdMock); expect(decryptMessageManagerMock.rejectMessage).toBeCalledTimes(1); expect(decryptMessageManagerMock.rejectMessage).toBeCalledWith( diff --git a/app/scripts/controllers/encryption-public-key.test.ts b/app/scripts/controllers/encryption-public-key.test.ts index 09b16dfb62a7..5a5755d1aec1 100644 --- a/app/scripts/controllers/encryption-public-key.test.ts +++ b/app/scripts/controllers/encryption-public-key.test.ts @@ -61,7 +61,7 @@ const createMessengerMock = () => registerInitialEventPayload: jest.fn(), // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - } as any as jest.Mocked); + }) as any as jest.Mocked; const createEncryptionPublicKeyManagerMock = () => ({ @@ -78,7 +78,7 @@ const createEncryptionPublicKeyManagerMock = () => }, // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - } as any as jest.Mocked); + }) as any as jest.Mocked; describe('EncryptionPublicKeyController', () => { let encryptionPublicKeyController: EncryptionPublicKeyController; diff --git a/app/scripts/controllers/permissions/background-api.test.js b/app/scripts/controllers/permissions/background-api.test.js index 2a050b29a00e..3d863db7949a 100644 --- a/app/scripts/controllers/permissions/background-api.test.js +++ b/app/scripts/controllers/permissions/background-api.test.js @@ -183,9 +183,10 @@ describe('permission background API methods', () => { }), }; - const id = await getPermissionBackgroundApiMethods( - permissionController, - ).requestAccountsPermissionWithId('foo.com'); + const id = + await getPermissionBackgroundApiMethods( + permissionController, + ).requestAccountsPermissionWithId('foo.com'); expect(permissionController.requestPermissions).toHaveBeenCalledTimes(1); expect(permissionController.requestPermissions).toHaveBeenCalledWith( @@ -211,9 +212,10 @@ describe('permission background API methods', () => { }), }; - const id = await getPermissionBackgroundApiMethods( - permissionController, - ).requestAccountsAndChainPermissionsWithId('foo.com'); + const id = + await getPermissionBackgroundApiMethods( + permissionController, + ).requestAccountsAndChainPermissionsWithId('foo.com'); expect(permissionController.requestPermissions).toHaveBeenCalledTimes(1); expect(permissionController.requestPermissions).toHaveBeenCalledWith( diff --git a/app/scripts/lib/state-utils.ts b/app/scripts/lib/state-utils.ts index 90275bbc7d33..423963985a6b 100644 --- a/app/scripts/lib/state-utils.ts +++ b/app/scripts/lib/state-utils.ts @@ -25,10 +25,13 @@ function sanitizeSnapData(state: FlattenedUIState) { return; } - state.snaps = Object.values(snapsData).reduce((acc, snap) => { - acc[snap.id] = stripLargeSnapData(snap) as Snap; - return acc; - }, {} as SnapControllerState['snaps']); + state.snaps = Object.values(snapsData).reduce( + (acc, snap) => { + acc[snap.id] = stripLargeSnapData(snap) as Snap; + return acc; + }, + {} as SnapControllerState['snaps'], + ); } function stripLargeSnapData(snapData: Snap): Partial { diff --git a/app/scripts/lib/transaction/util.ts b/app/scripts/lib/transaction/util.ts index 0bbf93afd8a8..97cd0bef83f4 100644 --- a/app/scripts/lib/transaction/util.ts +++ b/app/scripts/lib/transaction/util.ts @@ -97,9 +97,8 @@ export async function addTransaction( ): Promise { await validateSecurity(request); - const { transactionMeta, waitForHash } = await addTransactionOrUserOperation( - request, - ); + const { transactionMeta, waitForHash } = + await addTransactionOrUserOperation(request); if (!request.waitForSubmit) { waitForHash().catch(() => { diff --git a/app/scripts/lib/tx-verification/tx-verification-middleware.test.ts b/app/scripts/lib/tx-verification/tx-verification-middleware.test.ts index ea0aea6216d0..8ef2227137e2 100644 --- a/app/scripts/lib/tx-verification/tx-verification-middleware.test.ts +++ b/app/scripts/lib/tx-verification/tx-verification-middleware.test.ts @@ -11,7 +11,7 @@ import { } from './tx-verification-middleware'; const getMockNetworkController = (chainId: `0x${string}` = '0x1') => - ({ state: mockNetworkState({ chainId }) } as NetworkController); + ({ state: mockNetworkState({ chainId }) }) as NetworkController; const mockTrustedSigners: Partial> = { [EXPERIENCES_TYPE.METAMASK_BRIDGE]: diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index ac633bbc8e5d..9dc82989b653 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -4838,9 +4838,8 @@ export default class MetamaskController extends EventEmitter { * @returns {'hardware' | 'imported' | 'snap' | 'MetaMask'} */ async getAccountType(address) { - const keyringType = await this.keyringController.getAccountKeyringType( - address, - ); + const keyringType = + await this.keyringController.getAccountKeyringType(address); switch (keyringType) { case KeyringType.trezor: case KeyringType.lattice: @@ -4951,9 +4950,8 @@ export default class MetamaskController extends EventEmitter { async addNewAccount(accountCount) { const oldAccounts = await this.keyringController.getAccounts(); - const addedAccountAddress = await this.keyringController.addNewAccount( - accountCount, - ); + const addedAccountAddress = + await this.keyringController.addNewAccount(accountCount); if (!oldAccounts.includes(addedAccountAddress)) { this.preferencesController.setSelectedAddress(addedAccountAddress); diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js index 2ccf864b0edd..10243261dfd7 100644 --- a/app/scripts/metamask-controller.test.js +++ b/app/scripts/metamask-controller.test.js @@ -639,12 +639,10 @@ describe('MetaMaskController', () => { it('can only create new vault on keyringController once', async () => { const password = 'a-fake-password'; - const vault1 = await metamaskController.createNewVaultAndKeychain( - password, - ); - const vault2 = await metamaskController.createNewVaultAndKeychain( - password, - ); + const vault1 = + await metamaskController.createNewVaultAndKeychain(password); + const vault2 = + await metamaskController.createNewVaultAndKeychain(password); expect(vault1).toStrictEqual(vault2); }); @@ -885,9 +883,8 @@ describe('MetaMaskController', () => { it('should be unlocked by default', async () => { await metamaskController.connectHardware(device, 0); - const status = await metamaskController.checkHardwareStatus( - device, - ); + const status = + await metamaskController.checkHardwareStatus(device); expect(status).toStrictEqual(true); }); @@ -2192,9 +2189,8 @@ describe('MetaMaskController', () => { ) .mockReturnValue(tokenData); - const tokenSymbol = await metamaskController.getTokenSymbol( - '0xNotInTokenList', - ); + const tokenSymbol = + await metamaskController.getTokenSymbol('0xNotInTokenList'); expect(tokenSymbol).toStrictEqual(tokenData.symbol); }); @@ -2230,9 +2226,8 @@ describe('MetaMaskController', () => { throw new Error('error'); }); - const tokenSymbol = await metamaskController.getTokenSymbol( - '0xNotInTokenList', - ); + const tokenSymbol = + await metamaskController.getTokenSymbol('0xNotInTokenList'); expect(tokenSymbol).toStrictEqual(null); }); diff --git a/app/scripts/services/data-deletion-service.test.ts b/app/scripts/services/data-deletion-service.test.ts index f1619ddd0530..c4dbe6ceb887 100644 --- a/app/scripts/services/data-deletion-service.test.ts +++ b/app/scripts/services/data-deletion-service.test.ts @@ -575,9 +575,8 @@ describe('DataDeletionService', () => { mockDataDeletionStatusInterceptor(mockTaskId).reply(200, mockResponse); const dataDeletionService = new DataDeletionService(getDefaultOptions()); - const response = await dataDeletionService.fetchDeletionRegulationStatus( - mockTaskId, - ); + const response = + await dataDeletionService.fetchDeletionRegulationStatus(mockTaskId); expect(response).toStrictEqual(mockOverAllStatus); }); @@ -623,9 +622,8 @@ describe('DataDeletionService', () => { mockDataDeletionStatusInterceptor(mockTaskId).reply(200, mockResponse); const dataDeletionService = new DataDeletionService(getDefaultOptions()); - const response = await dataDeletionService.fetchDeletionRegulationStatus( - mockTaskId, - ); + const response = + await dataDeletionService.fetchDeletionRegulationStatus(mockTaskId); expect(response).toStrictEqual(mockOverAllStatus); }); diff --git a/app/scripts/services/data-deletion-service.ts b/app/scripts/services/data-deletion-service.ts index 5ec9ede75a87..f434127fe4ef 100644 --- a/app/scripts/services/data-deletion-service.ts +++ b/app/scripts/services/data-deletion-service.ts @@ -18,11 +18,11 @@ const fallbackDataDeletionEndpoint = 'https://metametrics.metamask.test'; const DEFAULT_ANALYTICS_DATA_DELETION_SOURCE_ID = inTest ? fallbackSourceId - : process.env.ANALYTICS_DATA_DELETION_SOURCE_ID ?? fallbackSourceId; + : (process.env.ANALYTICS_DATA_DELETION_SOURCE_ID ?? fallbackSourceId); const DEFAULT_ANALYTICS_DATA_DELETION_ENDPOINT = inTest ? fallbackDataDeletionEndpoint - : process.env.ANALYTICS_DATA_DELETION_ENDPOINT ?? - fallbackDataDeletionEndpoint; + : (process.env.ANALYTICS_DATA_DELETION_ENDPOINT ?? + fallbackDataDeletionEndpoint); /** * The number of times we retry a specific failed request to the data deletion API. diff --git a/development/webpack/test/helpers.ts b/development/webpack/test/helpers.ts index b57ec7b46a6e..4c221a869dc7 100644 --- a/development/webpack/test/helpers.ts +++ b/development/webpack/test/helpers.ts @@ -33,21 +33,24 @@ export function mockWebpack( maps: (string | null)[], devtool: 'source-map' | 'hidden-source-map' | false = 'source-map', ) { - const assets = files.reduce((acc, name, i) => { - const source = contents[i]; - const map = maps?.[i]; - const webpackSource = map - ? new SourceMapSource(source, name, map) - : new RawSource(source); - acc[name] = { - name, - info: { - size: webpackSource.size(), - }, - source: webpackSource, - }; - return acc; - }, {} as Record); + const assets = files.reduce( + (acc, name, i) => { + const source = contents[i]; + const map = maps?.[i]; + const webpackSource = map + ? new SourceMapSource(source, name, map) + : new RawSource(source); + acc[name] = { + name, + info: { + size: webpackSource.size(), + }, + source: webpackSource, + }; + return acc; + }, + {} as Record, + ); let done: () => void; const promise = new Promise((resolve) => { done = resolve; diff --git a/development/webpack/test/plugins.ManifestPlugin.test.ts b/development/webpack/test/plugins.ManifestPlugin.test.ts index ff14904bb8d6..d009d1f50cf1 100644 --- a/development/webpack/test/plugins.ManifestPlugin.test.ts +++ b/development/webpack/test/plugins.ManifestPlugin.test.ts @@ -64,11 +64,9 @@ describe('ManifestPlugin', () => { zip, } = testCase; const context = join(__dirname, `fixtures/ManifestPlugin/${fixture}`); - const baseManifest = require(join( - context, - `manifest/v${manifestVersion}`, - '_base.json', - )); + const baseManifest = require( + join(context, `manifest/v${manifestVersion}`, '_base.json'), + ); const expectedAssets = getExpectedAssets(zip, browsers, files); const validateManifest = getValidateManifest(testCase, baseManifest); diff --git a/shared/lib/error-utils.js b/shared/lib/error-utils.js index 66efd6fb61fb..b3e1f235e166 100644 --- a/shared/lib/error-utils.js +++ b/shared/lib/error-utils.js @@ -23,9 +23,8 @@ const _setupLocale = async (currentLocale) => { promises.push(Promise.resolve({})); // currentLocaleMessages } - const [, enLocaleMessages, currentLocaleMessages] = await Promise.all( - promises, - ); + const [, enLocaleMessages, currentLocaleMessages] = + await Promise.all(promises); return { currentLocaleMessages, enLocaleMessages }; }; diff --git a/test/e2e/benchmark.js b/test/e2e/benchmark.js index 1f24a960d9eb..bea0bfcd5f6b 100755 --- a/test/e2e/benchmark.js +++ b/test/e2e/benchmark.js @@ -171,9 +171,8 @@ async function main() { let existingParentDirectory; if (out) { outputDirectory = path.dirname(out); - existingParentDirectory = await getFirstParentDirectoryThatExists( - outputDirectory, - ); + existingParentDirectory = + await getFirstParentDirectoryThatExists(outputDirectory); if (!(await isWritable(existingParentDirectory))) { throw new Error('Specified output file directory is not writable'); } diff --git a/test/e2e/flask/btc/common-btc.ts b/test/e2e/flask/btc/common-btc.ts index 452f9ad44f6b..0113b80765c3 100644 --- a/test/e2e/flask/btc/common-btc.ts +++ b/test/e2e/flask/btc/common-btc.ts @@ -240,9 +240,9 @@ export async function withBtcAccountSnap( export async function getQuickNodeSeenRequests(mockServer: Mockttp) { const seenRequests = await Promise.all( - ( - await mockServer.getMockedEndpoints() - ).map((mockedEndpoint) => mockedEndpoint.getSeenRequests()), + (await mockServer.getMockedEndpoints()).map((mockedEndpoint) => + mockedEndpoint.getSeenRequests(), + ), ); return seenRequests .flat() diff --git a/test/e2e/flask/user-operations.spec.ts b/test/e2e/flask/user-operations.spec.ts index 7512e0b563c9..4304868a9376 100644 --- a/test/e2e/flask/user-operations.spec.ts +++ b/test/e2e/flask/user-operations.spec.ts @@ -166,9 +166,8 @@ async function expectTransactionDetailsMatchReceipt( throw new Error('No user operation hash found'); } - const receipt = await bundlerServer.getUserOperationReceipt( - userOperationHash, - ); + const receipt = + await bundlerServer.getUserOperationReceipt(userOperationHash); if (!receipt) { throw new Error('No user operation receipt found'); diff --git a/test/e2e/lavamoat-stats.js b/test/e2e/lavamoat-stats.js index 2dcf83ac2fc0..d7c787bd276d 100755 --- a/test/e2e/lavamoat-stats.js +++ b/test/e2e/lavamoat-stats.js @@ -110,9 +110,8 @@ async function main() { let existingParentDirectory; if (out) { outputDirectory = path.dirname(out); - existingParentDirectory = await getFirstParentDirectoryThatExists( - outputDirectory, - ); + existingParentDirectory = + await getFirstParentDirectoryThatExists(outputDirectory); if (!(await isWritable(existingParentDirectory))) { throw new Error('Specified output file directory is not writable'); } diff --git a/test/e2e/mv3-perf-stats/bundle-size.js b/test/e2e/mv3-perf-stats/bundle-size.js index d37ec561bde5..aaf5991c173f 100755 --- a/test/e2e/mv3-perf-stats/bundle-size.js +++ b/test/e2e/mv3-perf-stats/bundle-size.js @@ -107,9 +107,8 @@ async function main() { if (out) { const outPath = `${out}/bundle_size.json`; const outputDirectory = path.dirname(outPath); - const existingParentDirectory = await getFirstParentDirectoryThatExists( - outputDirectory, - ); + const existingParentDirectory = + await getFirstParentDirectoryThatExists(outputDirectory); if (!(await isWritable(existingParentDirectory))) { throw new Error('Specified output file directory is not writable'); } diff --git a/test/e2e/mv3-perf-stats/init-load-stats.js b/test/e2e/mv3-perf-stats/init-load-stats.js index 40584343d990..b17d6ea1aaf0 100755 --- a/test/e2e/mv3-perf-stats/init-load-stats.js +++ b/test/e2e/mv3-perf-stats/init-load-stats.js @@ -96,9 +96,8 @@ async function main() { if (results[key]) { const outPath = `${out}/${dirPath}`; const outputDirectory = path.dirname(outPath); - const existingParentDirectory = await getFirstParentDirectoryThatExists( - outputDirectory, - ); + const existingParentDirectory = + await getFirstParentDirectoryThatExists(outputDirectory); if (!(await isWritable(existingParentDirectory))) { throw new Error('Specified output file directory is not writable'); } diff --git a/test/e2e/mv3-stats.js b/test/e2e/mv3-stats.js index 2dd24791e9a5..9f08623a53f5 100755 --- a/test/e2e/mv3-stats.js +++ b/test/e2e/mv3-stats.js @@ -93,9 +93,8 @@ async function main() { if (results[key]) { const outPath = `${out}/${dirPath}`; const outputDirectory = path.dirname(outPath); - const existingParentDirectory = await getFirstParentDirectoryThatExists( - outputDirectory, - ); + const existingParentDirectory = + await getFirstParentDirectoryThatExists(outputDirectory); if (!(await isWritable(existingParentDirectory))) { throw new Error('Specified output file directory is not writable'); } diff --git a/test/e2e/page-objects/pages/homepage.ts b/test/e2e/page-objects/pages/homepage.ts index 6a8a916d4349..a91d9b59478c 100644 --- a/test/e2e/page-objects/pages/homepage.ts +++ b/test/e2e/page-objects/pages/homepage.ts @@ -337,9 +337,8 @@ class HomePage { const transactionAmounts = await this.driver.findElements( this.transactionAmountsInActivity, ); - const transactionAmountsText = await transactionAmounts[ - expectedNumber - 1 - ].getText(); + const transactionAmountsText = + await transactionAmounts[expectedNumber - 1].getText(); assert.equal( transactionAmountsText, expectedAmount, diff --git a/test/e2e/page-objects/pages/onboarding/onboarding-privacy-settings-page.ts b/test/e2e/page-objects/pages/onboarding/onboarding-privacy-settings-page.ts index e8288edb98cb..e06e4cbb9aef 100644 --- a/test/e2e/page-objects/pages/onboarding/onboarding-privacy-settings-page.ts +++ b/test/e2e/page-objects/pages/onboarding/onboarding-privacy-settings-page.ts @@ -188,9 +188,9 @@ class OnboardingPrivacySettingsPage { await this.driver.clickElement(this.assetsSettings); await this.driver.waitForSelector(this.assetsSettingsMessage); await Promise.all( - ( - await this.driver.findClickableElements(this.assetsPrivacyToggle) - ).map((toggle) => toggle.click()), + (await this.driver.findClickableElements(this.assetsPrivacyToggle)).map( + (toggle) => toggle.click(), + ), ); await this.navigateBackToSettingsPage(); } diff --git a/test/e2e/run-openrpc-api-test-coverage.ts b/test/e2e/run-openrpc-api-test-coverage.ts index f192f6088954..f376a771dddd 100644 --- a/test/e2e/run-openrpc-api-test-coverage.ts +++ b/test/e2e/run-openrpc-api-test-coverage.ts @@ -171,9 +171,8 @@ async function main() { (signTypedData4Example.params[0] as ExampleObject).value = ACCOUNT_1; // update chainId for signTypedData - ( - signTypedData4Example.params[1] as ExampleObject - ).value.domain.chainId = 1337; + (signTypedData4Example.params[1] as ExampleObject).value.domain.chainId = + 1337; // net_version missing from execution-apis. see here: https://github.com/ethereum/execution-apis/issues/540 const netVersion: MethodObject = { diff --git a/test/e2e/tests/dapp-interactions/contract-interactions.spec.js b/test/e2e/tests/dapp-interactions/contract-interactions.spec.js index e7de105e0112..6d916f5ca9f9 100644 --- a/test/e2e/tests/dapp-interactions/contract-interactions.spec.js +++ b/test/e2e/tests/dapp-interactions/contract-interactions.spec.js @@ -27,9 +27,8 @@ describe('Deploy contract and call contract methods', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); // deploy contract diff --git a/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js b/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js index 131ebdf4ee73..7f35cbe81d5e 100644 --- a/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js +++ b/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js @@ -22,9 +22,8 @@ describe('Editing confirmations of dapp initiated contract interactions', functi title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver); // deploy contract diff --git a/test/e2e/tests/dapp-interactions/failing-contract.spec.js b/test/e2e/tests/dapp-interactions/failing-contract.spec.js index 5770adb1a3b9..748ab7e12763 100644 --- a/test/e2e/tests/dapp-interactions/failing-contract.spec.js +++ b/test/e2e/tests/dapp-interactions/failing-contract.spec.js @@ -24,9 +24,8 @@ describe('Failing contract interaction ', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); await openDapp(driver, contractAddress); @@ -88,9 +87,8 @@ describe('Failing contract interaction on non-EIP1559 network', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); await openDapp(driver, contractAddress); diff --git a/test/e2e/tests/network/custom-rpc-history.spec.js b/test/e2e/tests/network/custom-rpc-history.spec.js index 6e92f532698f..aaabb6b38b7f 100644 --- a/test/e2e/tests/network/custom-rpc-history.spec.js +++ b/test/e2e/tests/network/custom-rpc-history.spec.js @@ -310,9 +310,8 @@ describe('Custom RPC history', function () { const customNetworkName = 'http://127.0.0.1:8545/2'; const networkItemClassName = '.multichain-network-list-item'; - const networkListItems = await driver.findClickableElements( - networkItemClassName, - ); + const networkListItems = + await driver.findClickableElements(networkItemClassName); // click on menu button await driver.clickElement( @@ -345,9 +344,8 @@ describe('Custom RPC history', function () { await driver.clickElement('[data-testid="network-display"]'); // custom network http://127.0.0.1:8545/2 is removed from network list - const newNetworkListItems = await driver.findElements( - networkItemClassName, - ); + const newNetworkListItems = + await driver.findElements(networkItemClassName); assert.equal(networkListItems.length - 1, newNetworkListItems.length); }, diff --git a/test/e2e/tests/privacy/account-tracker-api-usage.spec.ts b/test/e2e/tests/privacy/account-tracker-api-usage.spec.ts index 24f2318fa13b..7f5da60694fd 100644 --- a/test/e2e/tests/privacy/account-tracker-api-usage.spec.ts +++ b/test/e2e/tests/privacy/account-tracker-api-usage.spec.ts @@ -108,9 +108,8 @@ describe('Account Tracker API Usage', function () { }, async ({ driver, mockedEndpoint }) => { await driver.delay(veryLargeDelayMs); - let allInfuraJsonRpcRequests = await getAllInfuraJsonRpcRequests( - mockedEndpoint, - ); + let allInfuraJsonRpcRequests = + await getAllInfuraJsonRpcRequests(mockedEndpoint); let rpcMethodsToTestRequests = getSpecifiedJsonRpcRequests( allInfuraJsonRpcRequests, RPC_METHODS_TO_TEST, @@ -128,9 +127,8 @@ describe('Account Tracker API Usage', function () { await homepage.check_pageIsLoaded(); await driver.delay(veryLargeDelayMs); - allInfuraJsonRpcRequests = await getAllInfuraJsonRpcRequests( - mockedEndpoint, - ); + allInfuraJsonRpcRequests = + await getAllInfuraJsonRpcRequests(mockedEndpoint); rpcMethodsToTestRequests = getSpecifiedJsonRpcRequests( allInfuraJsonRpcRequests, RPC_METHODS_TO_TEST, @@ -165,18 +163,16 @@ describe('Account Tracker API Usage', function () { const homepage = new HomePage(driver); await homepage.check_pageIsLoaded(); await driver.delay(veryLargeDelayMs); - const initialInfuraJsonRpcRequests = await getAllInfuraJsonRpcRequests( - mockedEndpoint, - ); + const initialInfuraJsonRpcRequests = + await getAllInfuraJsonRpcRequests(mockedEndpoint); await driver.openNewURL('about:blank'); // The delay is intentionally 20000, to ensure we cover at least 1 polling // loop of time for the block tracker. await driver.delay(20000); - const currentInfuraJsonRpcRequests = await getAllInfuraJsonRpcRequests( - mockedEndpoint, - ); + const currentInfuraJsonRpcRequests = + await getAllInfuraJsonRpcRequests(mockedEndpoint); const initialRpcMethodsToTestRequests = getSpecifiedJsonRpcRequests( initialInfuraJsonRpcRequests, diff --git a/test/e2e/tests/request-queuing/switchChain-watchAsset.spec.js b/test/e2e/tests/request-queuing/switchChain-watchAsset.spec.js index 5767bd26def5..cb18974d8965 100644 --- a/test/e2e/tests/request-queuing/switchChain-watchAsset.spec.js +++ b/test/e2e/tests/request-queuing/switchChain-watchAsset.spec.js @@ -37,9 +37,8 @@ describe('Request Queue SwitchChain -> WatchAsset', function () { }, async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver, ganacheServer); await openDapp(driver, contractAddress, DAPP_URL); diff --git a/test/e2e/tests/settings/4byte-directory.spec.js b/test/e2e/tests/settings/4byte-directory.spec.js index 483ff1e0149a..82cf4dd70c51 100644 --- a/test/e2e/tests/settings/4byte-directory.spec.js +++ b/test/e2e/tests/settings/4byte-directory.spec.js @@ -22,9 +22,8 @@ describe('4byte setting', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver); // deploy contract @@ -58,9 +57,8 @@ describe('4byte setting', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); // goes to the settings screen diff --git a/test/e2e/tests/tokens/add-hide-token.spec.js b/test/e2e/tests/tokens/add-hide-token.spec.js index 011d52849feb..2578333c3c64 100644 --- a/test/e2e/tests/tokens/add-hide-token.spec.js +++ b/test/e2e/tests/tokens/add-hide-token.spec.js @@ -175,9 +175,8 @@ describe('Add token using wallet_watchAsset', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); await driver.openNewPage('http://127.0.0.1:8080/'); @@ -227,9 +226,8 @@ describe('Add token using wallet_watchAsset', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); await driver.openNewPage('http://127.0.0.1:8080/'); diff --git a/test/e2e/tests/tokens/custom-token-add-approve.spec.js b/test/e2e/tests/tokens/custom-token-add-approve.spec.js index 4e85aae76fd6..45b254e93694 100644 --- a/test/e2e/tests/tokens/custom-token-add-approve.spec.js +++ b/test/e2e/tests/tokens/custom-token-add-approve.spec.js @@ -24,9 +24,8 @@ describe('Create token, approve token and approve token without gas', function ( title: this.test.fullTitle(), }, async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver, ganacheServer); // imports custom token from extension @@ -79,9 +78,8 @@ describe('Create token, approve token and approve token without gas', function ( title: this.test.fullTitle(), }, async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver, ganacheServer); // create token @@ -177,9 +175,8 @@ describe('Create token, approve token and approve token without gas', function ( title: this.test.fullTitle(), }, async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver, ganacheServer); // create token @@ -312,9 +309,8 @@ describe('Create token, approve token and approve token without gas', function ( title: this.test.fullTitle(), }, async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver, ganacheServer); // create token @@ -393,9 +389,8 @@ describe('Create token, approve token and approve token without gas', function ( title: this.test.fullTitle(), }, async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver, ganacheServer); await openDapp(driver, contractAddress); diff --git a/test/e2e/tests/tokens/custom-token-send-transfer.spec.js b/test/e2e/tests/tokens/custom-token-send-transfer.spec.js index 40b1872011bd..b94e70c810be 100644 --- a/test/e2e/tests/tokens/custom-token-send-transfer.spec.js +++ b/test/e2e/tests/tokens/custom-token-send-transfer.spec.js @@ -110,9 +110,8 @@ describe('Transfer custom tokens @no-mmi', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); // transfer token from dapp @@ -169,9 +168,8 @@ describe('Transfer custom tokens @no-mmi', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); // transfer token from dapp diff --git a/test/e2e/tests/tokens/increase-token-allowance.spec.js b/test/e2e/tests/tokens/increase-token-allowance.spec.js index 7df956e9df43..9b49bb8afc55 100644 --- a/test/e2e/tests/tokens/increase-token-allowance.spec.js +++ b/test/e2e/tests/tokens/increase-token-allowance.spec.js @@ -38,9 +38,8 @@ describe('Increase Token Allowance', function () { await unlockWallet(driver); - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await openDapp(driver, contractAddress); await deployTokenContract(driver); diff --git a/test/e2e/tests/tokens/nft/erc721-interaction.spec.js b/test/e2e/tests/tokens/nft/erc721-interaction.spec.js index 35750bae6d2c..b178fc5ed716 100644 --- a/test/e2e/tests/tokens/nft/erc721-interaction.spec.js +++ b/test/e2e/tests/tokens/nft/erc721-interaction.spec.js @@ -510,9 +510,8 @@ describe('ERC721 NFTs testdapp interaction', function () { const [func, params] = await driver.findElements( '.confirm-approve-content__data .confirm-approve-content__small-text', ); - const proceedWithCautionIsDisplayed = await driver.isElementPresent( - '.dialog--error', - ); + const proceedWithCautionIsDisplayed = + await driver.isElementPresent('.dialog--error'); assert.equal( await title.getText(), 'Revoke permission to access and transfer all of your TestDappNFTs?', diff --git a/test/e2e/tests/tokens/nft/remove-nft.spec.js b/test/e2e/tests/tokens/nft/remove-nft.spec.js index efeef01d9e6e..4a14100aeff9 100644 --- a/test/e2e/tests/tokens/nft/remove-nft.spec.js +++ b/test/e2e/tests/tokens/nft/remove-nft.spec.js @@ -50,9 +50,8 @@ describe('Remove NFT', function () { async ({ driver, mockedEndpoint: mockedEndpoints, contractRegistry }) => { await unlockWallet(driver); - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); // Open the details and click remove nft button await driver.clickElement('[data-testid="account-overview__nfts-tab"]'); diff --git a/test/e2e/tests/tokens/send-erc20-to-contract.spec.js b/test/e2e/tests/tokens/send-erc20-to-contract.spec.js index 6e94b6377e67..2885f9efbdd2 100644 --- a/test/e2e/tests/tokens/send-erc20-to-contract.spec.js +++ b/test/e2e/tests/tokens/send-erc20-to-contract.spec.js @@ -20,9 +20,8 @@ describe('Send ERC20 token to contract address', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await unlockWallet(driver); // Send TST diff --git a/test/e2e/tests/transaction/send-eth.spec.js b/test/e2e/tests/transaction/send-eth.spec.js index 5cbcb8309a18..ee68c2fa1c41 100644 --- a/test/e2e/tests/transaction/send-eth.spec.js +++ b/test/e2e/tests/transaction/send-eth.spec.js @@ -162,9 +162,8 @@ describe('Send ETH', function () { title: this.test.fullTitle(), }, async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); + const contractAddress = + await contractRegistry.getContractAddress(smartContract); await logInWithBalanceValidation(driver, ganacheServer); // Wait for balance to load diff --git a/test/e2e/user-actions-benchmark.js b/test/e2e/user-actions-benchmark.js index 5a851c59d61f..1244adeee191 100644 --- a/test/e2e/user-actions-benchmark.js +++ b/test/e2e/user-actions-benchmark.js @@ -126,9 +126,8 @@ async function main() { if (out) { const outputDirectory = path.dirname(out); - const existingParentDirectory = await getFirstParentDirectoryThatExists( - outputDirectory, - ); + const existingParentDirectory = + await getFirstParentDirectoryThatExists(outputDirectory); if (!(await isWritable(existingParentDirectory))) { throw new Error('Specified output file directory is not writable'); } diff --git a/test/integration/confirmations/transactions/alerts.test.tsx b/test/integration/confirmations/transactions/alerts.test.tsx index 74d37c858b0f..1edd4fee3d70 100644 --- a/test/integration/confirmations/transactions/alerts.test.tsx +++ b/test/integration/confirmations/transactions/alerts.test.tsx @@ -142,9 +142,8 @@ describe('Contract Interaction Confirmation Alerts', () => { ).toHaveTextContent('Gas prices are high and estimates are less accurate.'); expect(await screen.findByTestId('alert-modal-button')).toBeInTheDocument(); - const alertModalConfirmButton = await screen.findByTestId( - 'alert-modal-button', - ); + const alertModalConfirmButton = + await screen.findByTestId('alert-modal-button'); fireEvent.click(alertModalConfirmButton); @@ -197,9 +196,8 @@ describe('Contract Interaction Confirmation Alerts', () => { ); expect(await screen.findByTestId('alert-modal-button')).toBeInTheDocument(); - const alertModalConfirmButton = await screen.findByTestId( - 'alert-modal-button', - ); + const alertModalConfirmButton = + await screen.findByTestId('alert-modal-button'); fireEvent.click(alertModalConfirmButton); diff --git a/test/stub/networks.ts b/test/stub/networks.ts index bae4798d001f..64d326ebf019 100644 --- a/test/stub/networks.ts +++ b/test/stub/networks.ts @@ -92,8 +92,8 @@ export const mockNetworkState = ( const networkConfigurations = networks.map((network) => { const blockExplorer = !('blockExplorerUrl' in network) || network.blockExplorerUrl - ? network.blockExplorerUrl ?? - `https://localhost/blockExplorer/${network.chainId}` + ? (network.blockExplorerUrl ?? + `https://localhost/blockExplorer/${network.chainId}`) : undefined; const rpc = diff --git a/ui/components/app/assets/asset-list/asset-list-control-bar/asset-list-control-bar.tsx b/ui/components/app/assets/asset-list/asset-list-control-bar/asset-list-control-bar.tsx index a09b5128396a..c311ac1299b3 100644 --- a/ui/components/app/assets/asset-list/asset-list-control-bar/asset-list-control-bar.tsx +++ b/ui/components/app/assets/asset-list/asset-list-control-bar/asset-list-control-bar.tsx @@ -185,7 +185,7 @@ const AssetListControlBar = ({ showTokensLinks }: AssetListControlBarProps) => { ellipsis > {allNetworksFilterShown - ? currentNetwork?.nickname ?? t('currentNetwork') + ? (currentNetwork?.nickname ?? t('currentNetwork')) : t('allNetworks')} )} diff --git a/ui/components/app/name/name-details/name-details.tsx b/ui/components/app/name/name-details/name-details.tsx index 1bb2b1f1e478..689bc57ccf51 100644 --- a/ui/components/app/name/name-details/name-details.tsx +++ b/ui/components/app/name/name-details/name-details.tsx @@ -248,7 +248,7 @@ export default function NameDetails({ setName(savedPetname ?? ''); setSelectedSourceId(savedSourceId ?? undefined); setSelectedSourceName( - savedSourceId ? savedPetname ?? undefined : undefined, + savedSourceId ? (savedPetname ?? undefined) : undefined, ); }, [savedPetname, savedSourceId, setName, setSelectedSourceId]); diff --git a/ui/helpers/utils/confirm-tx.util.ts b/ui/helpers/utils/confirm-tx.util.ts index cf760163f2d4..d83bb5e30f38 100644 --- a/ui/helpers/utils/confirm-tx.util.ts +++ b/ui/helpers/utils/confirm-tx.util.ts @@ -14,17 +14,23 @@ export function getHexGasTotal({ gasLimit = '0x0', gasPrice = '0x0' }): string { export function addEth(firstValue: string, ...otherValues: string[]): string { return otherValues - .reduce((numericAcc, ethAmount) => { - return numericAcc.add(new Numeric(ethAmount, 10)).round(6); - }, new Numeric(firstValue, 10)) + .reduce( + (numericAcc, ethAmount) => { + return numericAcc.add(new Numeric(ethAmount, 10)).round(6); + }, + new Numeric(firstValue, 10), + ) .toString(); } export function addFiat(firstValue: string, ...otherValues: string[]): string { return otherValues - .reduce((numericAcc, fiatAmount) => { - return numericAcc.add(new Numeric(fiatAmount, 10)).round(2); - }, new Numeric(firstValue, 10)) + .reduce( + (numericAcc, fiatAmount) => { + return numericAcc.add(new Numeric(fiatAmount, 10)).round(2); + }, + new Numeric(firstValue, 10), + ) .toString(); } diff --git a/ui/helpers/utils/util.js b/ui/helpers/utils/util.js index eafc8e31bfe5..1bb51fc264e4 100644 --- a/ui/helpers/utils/util.js +++ b/ui/helpers/utils/util.js @@ -855,5 +855,5 @@ export const getCalculatedTokenAmount1dAgo = ( ) => { return tokenPricePercentChange1dAgo !== undefined && tokenFiatBalance ? tokenFiatBalance / (1 + tokenPricePercentChange1dAgo / 100) - : tokenFiatBalance ?? 0; + : (tokenFiatBalance ?? 0); }; diff --git a/ui/hooks/useName.ts b/ui/hooks/useName.ts index dd587e81abf6..b6decf7b4942 100644 --- a/ui/hooks/useName.ts +++ b/ui/hooks/useName.ts @@ -33,7 +33,7 @@ export function useNames(requests: UseNameRequest[]): NameEntry[] { const entry = !variationEntry?.name && fallbackEntry ? fallbackEntry - : variationEntry ?? {}; + : (variationEntry ?? {}); const { name = null, diff --git a/ui/hooks/useShouldShowSpeedUp.js b/ui/hooks/useShouldShowSpeedUp.js index 5cd2b67707a7..9f7f66daeb1f 100644 --- a/ui/hooks/useShouldShowSpeedUp.js +++ b/ui/hooks/useShouldShowSpeedUp.js @@ -29,10 +29,13 @@ export function useShouldShowSpeedUp(transactionGroup, isEarliestNonce) { if (Date.now() - submittedTime > SECOND * 5) { setSpeedUpEnabled(true); } else { - timeoutId = setTimeout(() => { - setSpeedUpEnabled(true); - clearTimeout(timeoutId); - }, 5001 - (Date.now() - submittedTime)); + timeoutId = setTimeout( + () => { + setSpeedUpEnabled(true); + clearTimeout(timeoutId); + }, + 5001 - (Date.now() - submittedTime), + ); } } // Anytime the effect is re-ran, make sure to remove a previously set timeout diff --git a/ui/hooks/useTokenBalances.ts b/ui/hooks/useTokenBalances.ts index 8d3a078f8d07..811b06882447 100644 --- a/ui/hooks/useTokenBalances.ts +++ b/ui/hooks/useTokenBalances.ts @@ -41,25 +41,32 @@ export const useTokenTracker = ({ }) => { const { tokenBalances } = useTokenBalances({ chainIds: [chainId] }); - const tokensWithBalances = tokens.reduce((acc, token) => { - const hexBalance = - tokenBalances[address]?.[chainId]?.[token.address as Hex] ?? '0x0'; - if (hexBalance !== '0x0' || !hideZeroBalanceTokens) { - const decimalBalance = hexToDecimal(hexBalance); - acc.push({ - address: token.address, - symbol: token.symbol, - decimals: token.decimals, - balance: decimalBalance, - balanceError: null, - string: stringifyBalance( - new BN(decimalBalance), - new BN(token.decimals), - ), - }); - } - return acc; - }, [] as (Token & { balance: string; string: string; balanceError: unknown })[]); + const tokensWithBalances = tokens.reduce( + (acc, token) => { + const hexBalance = + tokenBalances[address]?.[chainId]?.[token.address as Hex] ?? '0x0'; + if (hexBalance !== '0x0' || !hideZeroBalanceTokens) { + const decimalBalance = hexToDecimal(hexBalance); + acc.push({ + address: token.address, + symbol: token.symbol, + decimals: token.decimals, + balance: decimalBalance, + balanceError: null, + string: stringifyBalance( + new BN(decimalBalance), + new BN(token.decimals), + ), + }); + } + return acc; + }, + [] as (Token & { + balance: string; + string: string; + balanceError: unknown; + })[], + ); return { tokensWithBalances, diff --git a/ui/hooks/useTokensWithFiltering.ts b/ui/hooks/useTokensWithFiltering.ts index a7ff3f2513ac..12208e5d44fd 100644 --- a/ui/hooks/useTokensWithFiltering.ts +++ b/ui/hooks/useTokensWithFiltering.ts @@ -45,7 +45,7 @@ export const useTokensWithFiltering = ( useSelector(getSelectedInternalAccountWithBalance); const allDetectedTokensForChainAndAddress = chainId - ? allDetectedTokens?.[chainId]?.[selectedAddress] ?? [] + ? (allDetectedTokens?.[chainId]?.[selectedAddress] ?? []) : []; const shouldHideZeroBalanceTokens = useSelector( diff --git a/ui/pages/asset/components/asset-page.tsx b/ui/pages/asset/components/asset-page.tsx index 19ce592f0071..a63d90b294c8 100644 --- a/ui/pages/asset/components/asset-page.tsx +++ b/ui/pages/asset/components/asset-page.tsx @@ -226,7 +226,7 @@ const AssetPage = ({ {name && symbol && name !== symbol ? `${name} (${symbol})` - : name ?? symbol} + : (name ?? symbol)} {optionsButton} diff --git a/ui/pages/asset/components/chart/crosshair-plugin.ts b/ui/pages/asset/components/chart/crosshair-plugin.ts index 1263ae340e37..f67ce7cfe10b 100644 --- a/ui/pages/asset/components/chart/crosshair-plugin.ts +++ b/ui/pages/asset/components/chart/crosshair-plugin.ts @@ -8,7 +8,7 @@ export const CrosshairPlugin = { id: 'crosshair', afterEvent(chart: CrosshairChart, { event }: { event: ChartEvent }) { chart.crosshairX = - event.type === 'mouseout' ? undefined : event.x ?? undefined; + event.type === 'mouseout' ? undefined : (event.x ?? undefined); chart.draw(); }, afterDraw(chart: CrosshairChart) { diff --git a/ui/pages/confirmations/components/confirm/footer/footer.test.tsx b/ui/pages/confirmations/components/confirm/footer/footer.test.tsx index 09d1fdf5753b..c0b539256748 100644 --- a/ui/pages/confirmations/components/confirm/footer/footer.test.tsx +++ b/ui/pages/confirmations/components/confirm/footer/footer.test.tsx @@ -142,17 +142,17 @@ describe('ConfirmFooter', () => { .spyOn(Actions, 'rejectPendingApproval') // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - .mockImplementation(() => ({} as any)); + .mockImplementation(() => ({}) as any); const updateCustomNonceSpy = jest .spyOn(Actions, 'updateCustomNonce') // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - .mockImplementation(() => ({} as any)); + .mockImplementation(() => ({}) as any); const setNextNonceSpy = jest .spyOn(Actions, 'setNextNonce') // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - .mockImplementation(() => ({} as any)); + .mockImplementation(() => ({}) as any); fireEvent.click(cancelButton); expect(rejectSpy).toHaveBeenCalled(); expect(updateCustomNonceSpy).toHaveBeenCalledWith(''); @@ -166,17 +166,17 @@ describe('ConfirmFooter', () => { .spyOn(Actions, 'resolvePendingApproval') // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - .mockImplementation(() => ({} as any)); + .mockImplementation(() => ({}) as any); const updateCustomNonceSpy = jest .spyOn(Actions, 'updateCustomNonce') // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - .mockImplementation(() => ({} as any)); + .mockImplementation(() => ({}) as any); const setNextNonceSpy = jest .spyOn(Actions, 'setNextNonce') // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - .mockImplementation(() => ({} as any)); + .mockImplementation(() => ({}) as any); fireEvent.click(submitButton); expect(resolveSpy).toHaveBeenCalled(); expect(updateCustomNonceSpy).toHaveBeenCalledWith(''); diff --git a/ui/pages/confirmations/components/confirm/info/typed-sign/permit-simulation/decoded-simulation/decoded-simulation.tsx b/ui/pages/confirmations/components/confirm/info/typed-sign/permit-simulation/decoded-simulation/decoded-simulation.tsx index b0a1ddee12e6..648a163f673b 100644 --- a/ui/pages/confirmations/components/confirm/info/typed-sign/permit-simulation/decoded-simulation/decoded-simulation.tsx +++ b/ui/pages/confirmations/components/confirm/info/typed-sign/permit-simulation/decoded-simulation/decoded-simulation.tsx @@ -31,7 +31,7 @@ const getStateChangeLabelMap = ( [DecodingDataChangeType.Revoke]: t('permitSimulationChange_revoke'), [DecodingDataChangeType.Bidding]: t('permitSimulationChange_bidding'), [DecodingDataChangeType.Listing]: t('permitSimulationChange_listing'), - }[changeType]); + })[changeType]; const StateChangeRow = ({ stateChange, diff --git a/ui/pages/confirmations/components/confirm/nav/nav.test.tsx b/ui/pages/confirmations/components/confirm/nav/nav.test.tsx index 0291c7de521b..93ee6b40a33c 100644 --- a/ui/pages/confirmations/components/confirm/nav/nav.test.tsx +++ b/ui/pages/confirmations/components/confirm/nav/nav.test.tsx @@ -120,7 +120,7 @@ describe('ConfirmNav', () => { .spyOn(Actions, 'rejectPendingApproval') // TODO: Replace `any` with type // eslint-disable-next-line @typescript-eslint/no-explicit-any - .mockImplementation(() => ({} as any)); + .mockImplementation(() => ({}) as any); fireEvent.click(rejectAllButton); expect(rejectSpy).toHaveBeenCalledTimes(3); }); diff --git a/ui/pages/confirmations/components/simulation-details/sortBalanceChanges.test.ts b/ui/pages/confirmations/components/simulation-details/sortBalanceChanges.test.ts index 9496c1855f80..65bfd380cefc 100644 --- a/ui/pages/confirmations/components/simulation-details/sortBalanceChanges.test.ts +++ b/ui/pages/confirmations/components/simulation-details/sortBalanceChanges.test.ts @@ -11,7 +11,7 @@ describe('sortBalanceChanges', () => { ({ fiatAmount, asset: { standard }, - } as BalanceChange); + }) as BalanceChange; // @ts-expect-error This is missing from the Mocha type definitions it.each([ diff --git a/ui/pages/confirmations/components/simulation-details/useBalanceChanges.ts b/ui/pages/confirmations/components/simulation-details/useBalanceChanges.ts index 666682c95c76..a9950ca56a57 100644 --- a/ui/pages/confirmations/components/simulation-details/useBalanceChanges.ts +++ b/ui/pages/confirmations/components/simulation-details/useBalanceChanges.ts @@ -136,7 +136,7 @@ function getTokenBalanceChanges( const decimals = // TODO(dbrans): stopgap for https://github.com/MetaMask/metamask-extension/issues/24690 asset.standard === TokenStandard.ERC20 - ? erc20Decimals[asset.address] ?? ERC20_DEFAULT_DECIMALS + ? (erc20Decimals[asset.address] ?? ERC20_DEFAULT_DECIMALS) : 0; const amount = getAssetAmount(tokenBc, decimals); diff --git a/ui/pages/confirmations/hooks/useConfirmationAlertMetrics.ts b/ui/pages/confirmations/hooks/useConfirmationAlertMetrics.ts index c9af8a9d03ad..950b4e4993bc 100644 --- a/ui/pages/confirmations/hooks/useConfirmationAlertMetrics.ts +++ b/ui/pages/confirmations/hooks/useConfirmationAlertMetrics.ts @@ -39,7 +39,7 @@ function getAlertNames(alerts: Alert[]): string[] { function getAlertName(alertKey: string): string { return isUuid(alertKey) ? ALERTS_NAME_METRICS[AlertsName.Blockaid] - : ALERTS_NAME_METRICS[alertKey] ?? alertKey; + : (ALERTS_NAME_METRICS[alertKey] ?? alertKey); } export function useConfirmationAlertMetrics() { diff --git a/ui/pages/settings/networks-tab/networks-form/networks-form.tsx b/ui/pages/settings/networks-tab/networks-form/networks-form.tsx index 6c5ecdad8c58..bc43f436a3d1 100644 --- a/ui/pages/settings/networks-tab/networks-form/networks-form.tsx +++ b/ui/pages/settings/networks-tab/networks-form/networks-form.tsx @@ -122,8 +122,8 @@ export const NetworksForm = ({ useEffect(() => { const chainIdHex = chainId ? toHex(chainId) : undefined; const expectedName = chainIdHex - ? NETWORK_TO_NAME_MAP[chainIdHex as keyof typeof NETWORK_TO_NAME_MAP] ?? - safeChains?.find((chain) => toHex(chain.chainId) === chainIdHex)?.name + ? (NETWORK_TO_NAME_MAP[chainIdHex as keyof typeof NETWORK_TO_NAME_MAP] ?? + safeChains?.find((chain) => toHex(chain.chainId) === chainIdHex)?.name) : undefined; const mismatch = expectedName && expectedName !== name; @@ -143,11 +143,11 @@ export const NetworksForm = ({ useEffect(() => { const chainIdHex = chainId ? toHex(chainId) : undefined; const expectedSymbol = chainIdHex - ? CHAIN_ID_TO_CURRENCY_SYMBOL_MAP[ + ? (CHAIN_ID_TO_CURRENCY_SYMBOL_MAP[ chainIdHex as keyof typeof CHAIN_ID_TO_CURRENCY_SYMBOL_MAP ] ?? safeChains?.find((chain) => toHex(chain.chainId) === chainIdHex) - ?.nativeCurrency?.symbol + ?.nativeCurrency?.symbol) : undefined; const mismatch = expectedSymbol && expectedSymbol !== ticker; diff --git a/ui/pages/swaps/prepare-swap-page/prepare-swap-page.js b/ui/pages/swaps/prepare-swap-page/prepare-swap-page.js index 1e5eb5179e2c..d03c4757965e 100644 --- a/ui/pages/swaps/prepare-swap-page/prepare-swap-page.js +++ b/ui/pages/swaps/prepare-swap-page/prepare-swap-page.js @@ -459,8 +459,8 @@ export default function PrepareSwapPage({ ); const blockExplorerLabel = rpcPrefs.blockExplorerUrl - ? CHAINID_DEFAULT_BLOCK_EXPLORER_HUMAN_READABLE_URL_MAP[chainId] ?? - t('etherscan') + ? (CHAINID_DEFAULT_BLOCK_EXPLORER_HUMAN_READABLE_URL_MAP[chainId] ?? + t('etherscan')) : t('etherscan'); const { address: toAddress } = toToken || {}; diff --git a/ui/selectors/multichain.ts b/ui/selectors/multichain.ts index 08078be52f03..3bb49a1b0fcc 100644 --- a/ui/selectors/multichain.ts +++ b/ui/selectors/multichain.ts @@ -306,7 +306,7 @@ export function getMultichainDefaultToken( ) { const symbol = getMultichainIsEvm(state, account) ? // We fallback to 'ETH' to keep original behavior of `getSwapsDefaultToken` - getProviderConfig(state)?.ticker ?? 'ETH' + (getProviderConfig(state)?.ticker ?? 'ETH') : getMultichainProviderConfig(state, account).ticker; return { symbol }; diff --git a/ui/selectors/nft.ts b/ui/selectors/nft.ts index ab3836714923..266bf782e4a8 100644 --- a/ui/selectors/nft.ts +++ b/ui/selectors/nft.ts @@ -48,16 +48,19 @@ export const getNftContractsByAddressByChain = createSelector( .flat() .flat(); - return allNftContracts.reduce((acc, contract) => { - const { chainId, ...data } = contract; + return allNftContracts.reduce( + (acc, contract) => { + const { chainId, ...data } = contract; - const chainIdContracts = acc[chainId] ?? {}; - acc[chainId] = chainIdContracts; + const chainIdContracts = acc[chainId] ?? {}; + acc[chainId] = chainIdContracts; - chainIdContracts[data.address.toLowerCase()] = data; + chainIdContracts[data.address.toLowerCase()] = data; - return acc; - }, {} as { [chainId: string]: { [address: string]: NftContract } }); + return acc; + }, + {} as { [chainId: string]: { [address: string]: NftContract } }, + ); }, ); diff --git a/ui/store/actions.ts b/ui/store/actions.ts index 66962d46161d..c48c5addafd6 100644 --- a/ui/store/actions.ts +++ b/ui/store/actions.ts @@ -3244,9 +3244,8 @@ export async function forceUpdateMetamaskState( let pendingPatches: Patch[] | undefined; try { - pendingPatches = await submitRequestToBackground( - 'getStatePatches', - ); + pendingPatches = + await submitRequestToBackground('getStatePatches'); } catch (error) { dispatch(displayWarning(error)); throw error;