Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 0 additions & 67 deletions .eslintrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// https://github.com/pnpm/pnpm/issues/4214
// https://github.com/pnpm/pnpm/issues/5391

const rootPkg = require('./package.json');

console.log(`Checking for package peerDependency overrides`);

const remapPeerDependencies = [
Expand Down
3 changes: 2 additions & 1 deletion .storybook/__mocks__/@bundlr-network/client.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Mock for @bundlr-network/client to avoid Node.js stream.Transform incompatibility in browser environment
export default {};
const mock = {};
export default mock;
export const WebBundlr = class {};
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';

import type { StorybookConfig } from '@storybook/nextjs-vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills';

Expand Down
13 changes: 7 additions & 6 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import type { Preview } from '@storybook/react';
import React, { useEffect } from 'react';

import { Rubik } from 'next/font/google';

import './layout.min.css'; // uncomment this line to see Dashkit styles. TODO: remove upon migrating from Dashkit to Tailwind
import './dashkit-polyfill.css';
import '@/app/styles.css';

import type { Preview } from '@storybook/react';
import { Rubik } from 'next/font/google';
import React, { useEffect } from 'react';

// Load font with display: swap for better loading behavior
const rubikFont = Rubik({
display: 'swap',
Expand All @@ -29,7 +28,9 @@ const preview: Preview = {
},
controls: {
matchers: {
// eslint-disable-next-line no-restricted-syntax -- Storybook controls matcher requires regex to match arg names
color: /(background|color)$/i,
// eslint-disable-next-line no-restricted-syntax -- Storybook controls matcher requires regex to match arg names
date: /Date$/i,
},
},
Expand All @@ -41,7 +42,7 @@ const preview: Preview = {
// Add useEffect to ensure font is properly loaded
useEffect(() => {
document.getElementById('storybook-outer')?.classList.add(rubikFont.className);
}, [rubikFont]);
}, []);

return (
<div id="storybook-outer" className={rubikFont.className}>
Expand Down
5 changes: 3 additions & 2 deletions .storybook/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { beforeAll } from 'vitest';
import { setProjectAnnotations } from '@storybook/nextjs-vite';
import * as a11yAnnotations from '@storybook/addon-a11y/preview';
import { setProjectAnnotations } from '@storybook/nextjs-vite';
import { beforeAll } from 'vitest';

import * as projectAnnotations from './preview';

// This is an important step to apply the right configuration when testing your stories.
Expand Down
2 changes: 1 addition & 1 deletion app/address/[address]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function AddressLayoutInner({ children, params: { address } }: Props) {

try {
pubkey = new PublicKey(address);
} catch (err) {
} catch (_err) {
/* empty */
}

Expand Down
2 changes: 1 addition & 1 deletion app/components/ClusterStatusButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function getCustomUrlClusterName(customUrl: string) {
return customUrl;
}
return `${url.protocol}//${url.hostname}`;
} catch (e) {
} catch (_e) {
return customUrl;
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ function buildOptions(rawSearch: string, cluster: Cluster, currentEpoch?: bigint
],
});
}
} catch (err) {
} catch (_err) {
// If bs58 decoding fails, check if it's a valid base64 string
if (isValidBase64(search)) {
const decodedTx = decodeTransactionFromBase64(search);
Expand Down Expand Up @@ -469,7 +469,7 @@ function decodeTransactionFromBase64(base64String: string): {
return {
message: base64String,
};
} catch (err) {
} catch (_err) {
return null;
}
}
Expand All @@ -478,7 +478,7 @@ function isValidBase64(str: string): boolean {
try {
Buffer.from(str, 'base64');
return true;
} catch (err) {
} catch (_err) {
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/__tests__/ClusterModal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ vi.mock('./ClusterModalDeveloperSettings', () => ({
}));

// Must import after mocks
// eslint-disable-next-line simple-import-sort/imports

import { ClusterModal } from '../ClusterModal';

function renderWithStore(initialClusters: SavedCluster[] = []) {
Expand Down
2 changes: 1 addition & 1 deletion app/components/account/MetaplexNFTAttributesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function NormalMetaplexNFTAttributesCard({ metadataUri }: { metadataUri: string
} else {
throw new Error('Attributes is not an array');
}
} catch (error) {
} catch (_error) {
setStatus('error');
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/account/UnknownAccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function useClusterAccountSearch(address: string, currentCluster: Cluster, _enab
// not only prevent span but allow component to react properly without making the structure complex
await sleep();
}
} catch (error) {
} catch (_error) {
// Check if this search is still active before continuing
if (searchIdRef.current !== currentSearchId) return;
// Continue to next cluster
Expand Down
2 changes: 1 addition & 1 deletion app/components/account/VerifiedBuildCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ function isValidLink(value: string) {
try {
const url = new URL(value);
return ['http:', 'https:'].includes(url.protocol);
} catch (err) {
} catch (_err) {
return false;
}
}
4 changes: 2 additions & 2 deletions app/components/block/BlockHistoryCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ export function BlockHistoryCard({ block, epoch }: { block: VersionedBlockRespon

logTruncated = parsedLogs[parsedLogs.length - 1].truncated;
computeUnits = parsedLogs.map(({ computeUnits }) => computeUnits).reduce((sum, next) => sum + next);
} catch (err) {
} catch (_err) {
// ignore parsing errors because some old logs aren't parsable
}

let costUnits: number | undefined = undefined;
try {
costUnits = tx.meta?.costUnits ?? 0;
} catch (err) {
} catch (_err) {
// ignore parsing errors because some old logs aren't parsable
}

Expand Down
12 changes: 6 additions & 6 deletions app/components/inspector/InspectorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function decodeParam(params: URLSearchParams, name: string): string | boolean {
if (param === null) return false;
try {
return decodeURIComponent(param);
} catch (err) {
} catch (_err) {
return true;
}
}
Expand All @@ -66,7 +66,7 @@ function decodeSignatures(signaturesParam: string): (string | null)[] {
let signatures;
try {
signatures = JSON.parse(signaturesParam);
} catch (err) {
} catch (_err) {
throw new Error('Signatures param is not valid JSON');
}

Expand All @@ -88,7 +88,7 @@ function decodeSignatures(signaturesParam: string): (string | null)[] {
try {
bs58.decode(signature);
validSignatures.push(signature);
} catch (err) {
} catch (_err) {
throw new Error('Signature is not valid base58');
}
}
Expand Down Expand Up @@ -118,7 +118,7 @@ function decodeUrlParams(
// Validate that it's a valid public key
new PublicKey(squadsTxParam);
return [{ account: squadsTxParam }, params, refreshUrl];
} catch (err) {
} catch (_err) {
params.delete('squadsTx');
refreshUrl = true;
}
Expand All @@ -137,7 +137,7 @@ function decodeUrlParams(
if (typeof signaturesParam === 'string') {
try {
signatures = decodeSignatures(signaturesParam);
} catch (err) {
} catch (_err) {
params.delete('signatures');
refreshUrl = true;
}
Expand All @@ -157,7 +157,7 @@ function decodeUrlParams(
signatures,
};
return [data, params, refreshUrl];
} catch (err) {
} catch (_err) {
params.delete('message');
refreshUrl = true;
return [messageParam, params, true];
Expand Down
4 changes: 2 additions & 2 deletions app/components/inspector/RawInputCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export function RawInput({
try {
// Try base58 decode, use result as Uint8Array
buffer = new Uint8Array(base58.decode(input));
} catch (err) {
} catch (_err) {
// If base58 fails, try base64
try {
buffer = Uint8Array.from(atob(input), c => c.charCodeAt(0));
Expand Down Expand Up @@ -282,7 +282,7 @@ export function RawInput({
input.value = value;
onInput();
}
}, [value, onInput]); // eslint-disable-line react-hooks/exhaustive-deps
}, [value, onInput]);

const placeholder = 'Paste a raw base58/base64 encoded transaction message or Squads vault transaction account';
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-syntax, no-restricted-globals -- test assertions use RegExp for pattern matching */
/* eslint-disable no-restricted-syntax -- test assertions use RegExp for pattern matching */
import * as spl from '@solana/spl-token';
import { TransactionMessage } from '@solana/web3.js';
import { render, screen, waitFor } from '@testing-library/react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-syntax, no-restricted-globals -- test assertions use RegExp for pattern matching */
/* eslint-disable no-restricted-syntax -- test assertions use RegExp for pattern matching */
import { SystemProgram } from '@solana/web3.js';
import { render, screen, waitFor } from '@testing-library/react';
import React from 'react';
Expand Down
2 changes: 0 additions & 2 deletions app/components/instruction/associated-token/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-redeclare */

import { PublicKeyFromString } from '@validators/pubkey';
import { enums, Infer, type } from 'superstruct';

Expand Down
2 changes: 0 additions & 2 deletions app/components/instruction/bpf-loader/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-redeclare */

import { PublicKeyFromString } from '@validators/pubkey';
import { enums, Infer, number, string, type } from 'superstruct';

Expand Down
2 changes: 0 additions & 2 deletions app/components/instruction/bpf-upgradeable-loader/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-redeclare */

import { PublicKeyFromString } from '@validators/pubkey';
import { enums, Infer, nullable, number, optional, string, type } from 'superstruct';

Expand Down
2 changes: 1 addition & 1 deletion app/components/instruction/ed25519/Ed25519DetailsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const extractData = (
const targetIx = tx.message.instructions[instructionIndex] as PartiallyDecodedInstruction;
try {
return bs58.decode(targetIx.data).slice(dataOffset, dataOffset + dataLength);
} catch (err) {
} catch (_err) {
return null;
}
};
Expand Down
Loading