diff --git a/packages/apps/docs/src/scripts/importReadme.mjs b/packages/apps/docs/src/scripts/importReadme.mjs index c52050722b..04026e650e 100644 --- a/packages/apps/docs/src/scripts/importReadme.mjs +++ b/packages/apps/docs/src/scripts/importReadme.mjs @@ -175,7 +175,7 @@ const relinkLinkReferences = (refs, definitions, pages, root) => { }); }; -const relinkImageReferences = (refs, definitions, pages, root) => { +const relinkImageReferences = (refs, definitions) => { refs.map((ref) => { const definition = definitions.find((def) => def.label === ref.label); if (!definition) { diff --git a/packages/apps/docs/src/utils/staticGeneration/checkSubTreeForActive.mjs b/packages/apps/docs/src/utils/staticGeneration/checkSubTreeForActive.mjs index 64de3d51c9..81ec1f3163 100644 --- a/packages/apps/docs/src/utils/staticGeneration/checkSubTreeForActive.mjs +++ b/packages/apps/docs/src/utils/staticGeneration/checkSubTreeForActive.mjs @@ -1,6 +1,11 @@ import { getData } from './getData.mjs'; import path from 'path'; +const omit = (obj, ...keysToOmit) => + Object.keys(obj) + .filter((key) => !keysToOmit.includes(key)) + .reduce((acc, key) => ({ ...acc, [key]: obj[key] }), {}); + const isIndex = (filename) => { return filename === 'index'; }; @@ -31,18 +36,17 @@ const IsMenuOpen = (pathname, itemRoot) => const isPathRoot = (pathname, itemRoot) => itemRoot === pathname; const mapSubTree = (pathname, noChildren, isRoot) => (item) => { - const { - description, - subTitle, - layout, - navigation, - editLink, - order, - lastModifiedDate, - publishDate, - author, - ...newItem - } = item; + const newItem = omit(item, [ + 'description', + 'subTitle', + 'layout', + 'navigation', + 'editLink', + 'order', + 'lastModifiedDate', + 'publishDate', + 'author', + ]); if (IsMenuOpen(pathname, newItem.root)) { newItem.isMenuOpen = true; @@ -56,9 +60,6 @@ const mapSubTree = (pathname, noChildren, isRoot) => (item) => { newItem.isActive = false; } - delete newItem.description; - delete newItem.subTitle; - // is the actual item active if (!newItem.children || noChildren) newItem.children = []; if (isRoot && !pathname.includes(newItem.root)) newItem.children = []; diff --git a/packages/apps/graph-client/src/components/chainweb/chain-block/chain-block.tsx b/packages/apps/graph-client/src/components/chainweb/chain-block/chain-block.tsx index bca9233092..9f5bd6031b 100644 --- a/packages/apps/graph-client/src/components/chainweb/chain-block/chain-block.tsx +++ b/packages/apps/graph-client/src/components/chainweb/chain-block/chain-block.tsx @@ -1,11 +1,10 @@ import { IBlock } from '../../../utils/hooks/use-parsed-blocks'; import { Box } from '../../box'; -import { Text } from '../../text'; import { TimeTicker } from './../time-ticker'; import { Container, Content } from './styles'; -import { RocketIcon, TimerIcon } from '@radix-ui/react-icons'; +import { TimerIcon } from '@radix-ui/react-icons'; import React from 'react'; interface IChainBlockProps { diff --git a/packages/libs/client-examples/src/example-contract/crosschain-transfer.ts b/packages/libs/client-examples/src/example-contract/crosschain-transfer.ts index 027a383fa5..8053a2b3a5 100644 --- a/packages/libs/client-examples/src/example-contract/crosschain-transfer.ts +++ b/packages/libs/client-examples/src/example-contract/crosschain-transfer.ts @@ -93,7 +93,6 @@ async function doCrossChainTransfer( to: IAccount, amount: string, ): Promise> { - const state = {}; return ( Promise.resolve(startInTheFirstChain(from, to, amount)) .then((command) => signWithChainweaver(command)) diff --git a/packages/libs/client-examples/src/example-contract/functional/transfer-fp.ts b/packages/libs/client-examples/src/example-contract/functional/transfer-fp.ts index e83e3dc9eb..8729911cf9 100644 --- a/packages/libs/client-examples/src/example-contract/functional/transfer-fp.ts +++ b/packages/libs/client-examples/src/example-contract/functional/transfer-fp.ts @@ -16,7 +16,7 @@ import { import { pollStatus, preflight, submit } from '../util/client'; import { asyncPipe, inspect } from '../util/fp-helpers'; -// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/explicit-function-return-type +// eslint-disable-next-line @typescript-eslint/explicit-function-return-type const getTransferCommand = ({ sender, receiver, diff --git a/packages/libs/pactjs-generator/src/contract/parsing/lexer.js b/packages/libs/pactjs-generator/src/contract/parsing/lexer.js index 9ae82e154a..49e48ca9e4 100644 --- a/packages/libs/pactjs-generator/src/contract/parsing/lexer.js +++ b/packages/libs/pactjs-generator/src/contract/parsing/lexer.js @@ -271,16 +271,6 @@ function getModuleAndMethods(contract, logger) { return output; } exports.getModuleAndMethods = getModuleAndMethods; -var TYPED_TOKEN_MATCH = 'atom,colon,atom'; -function lastThreeTokenTypedAtomMatch(tokens) { - return ( - tokens - .map(function (t) { - return t === null || t === void 0 ? void 0 : t.type; - }) - .join() === TYPED_TOKEN_MATCH - ); -} var getLexerOutput = function (contract, logger) { if (logger === void 0) { logger = function () {};