Skip to content

Commit

Permalink
Remove unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Aug 29, 2023
1 parent 3fa23dd commit 513a422
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 30 deletions.
2 changes: 1 addition & 1 deletion packages/apps/docs/src/scripts/importReadme.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
};
Expand Down Expand Up @@ -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;
Expand All @@ -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 = [];
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ async function doCrossChainTransfer(
to: IAccount,
amount: string,
): Promise<Record<string, ICommandResult>> {
const state = {};
return (
Promise.resolve(startInTheFirstChain(from, to, amount))
.then((command) => signWithChainweaver(command))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 0 additions & 10 deletions packages/libs/pactjs-generator/src/contract/parsing/lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {};
Expand Down

0 comments on commit 513a422

Please sign in to comment.