Skip to content

chore: add stricter linting, import sorting, and prettier#385

Merged
ECWireless merged 13 commits intomainfrom
335-add-stricter-linting-and-import-sorting
Nov 23, 2025
Merged

chore: add stricter linting, import sorting, and prettier#385
ECWireless merged 13 commits intomainfrom
335-add-stricter-linting-and-import-sorting

Conversation

@ECWireless
Copy link
Collaborator

Summary

AI Summary

This pull request introduces a variety of improvements and code quality enhancements across multiple components, with a focus on code consistency, type safety, and maintainability. The most notable changes include updates to styling conventions, improved TypeScript typing, import order standardization, and better handling of contract interactions.

Styling and Code Consistency

  • Replaced shorthand CSS properties (e.g., p, py, pl, pr, mr, pt, pb, px) with explicit property names like padding, paddingTop, paddingBottom, paddingLeft, paddingRight, and marginRight across several components for improved clarity and consistency. [1] [2] [3] [4] [5] [6]
  • Updated style property names such as bc to backgroundColor for clarity in ActiveCircle.

Type Safety and Logic Improvements

  • Enhanced type safety in the Claim component by specifying types for proof and migrationParams, initializing defaults, and ensuring correct types are passed to contract calls. [1] [2] [3]
  • Improved the Footer component's type definitions, making the reset function signature explicit and clarifying union and optional types for props. [1] [2]

Import Order and Code Hygiene

  • Standardized import orders, moving external library imports to the top and organizing local imports for better readability and maintainability. [1] [2] [3] [4] [5] [6] [7] [8]
  • Removed unused imports such as l1Migrator and getL1MigratorAddress from the Claim component.

Miscellaneous Improvements

  • Added a .prettierignore file to exclude build artifacts, dependencies, and miscellaneous files from formatting, helping maintain a clean codebase.
  • Minor fixes to markdown table formatting in README.md for consistency.
  • Corrected asynchronous logic in createSchema by removing unnecessary await.
  • Improved memoization dependencies in the Input component to ensure correct recalculation when relevant props change.
  • Fixed children rendering in CircularProgressBar for correctness.

These changes collectively improve code readability, maintainability, and robustness, setting a better foundation for future development.

Copilot AI review requested due to automatic review settings November 14, 2025 20:37
@ECWireless ECWireless linked an issue Nov 14, 2025 that may be closed by this pull request
@vercel
Copy link
Contributor

vercel bot commented Nov 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
explorer-arbitrum-one Ready Ready Preview Comment Nov 23, 2025 7:46pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces stricter linting, import sorting with eslint-plugin-simple-import-sort, and Prettier formatting across the codebase. The changes primarily focus on code style improvements including:

  • Standardized import ordering (external dependencies first, then internal imports, with blank lines separating groups)
  • Consistent formatting with Prettier (2-space indentation, double quotes, trailing commas)
  • Replacement of CSS shorthand properties with explicit names (e.g., ppadding, mbmarginBottom)
  • Enhanced type safety in several components

Key Changes

  • Added ESLint import sorting plugin and Prettier configuration
  • Updated dependency arrays in React hooks to include all dependencies
  • Improved type annotations in components like Claim, VotingWidget, and DelegatingWidget
  • Cleaned up unused imports and variables throughout the codebase

Reviewed Changes

Copilot reviewed 114 out of 119 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
eslint.config.mjs Added import sorting rules and Prettier integration
prettier.config.mjs New Prettier configuration with project standards
package.json Added Prettier and import sorting dependencies, new format scripts
apollo/createSchema.ts Removed await from introspectSchema (bug introduced)
components/Claim/index.tsx Added proper type annotations for proof and migration parameters
components/CircularProgressBar/index.tsx Fixed children prop usage
components/DelegatingWidget/Input.tsx Corrected useMemo dependency array
components/PerformanceList/index.tsx Updated useMemo dependencies
pages/voting/create-poll.tsx Added config to useEffect dependency array
pages/migrate/broadcaster.tsx Changed Math.random() key to constant (questionable pattern)
All other files Import sorting, formatting, and CSS property name expansions
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Collaborator

@Jipperism Jipperism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation bot moved this from Backlog to Todo in Explorer Revamp Nov 23, 2025
@ECWireless ECWireless merged commit 91e70c7 into main Nov 23, 2025
2 checks passed
@ECWireless ECWireless deleted the 335-add-stricter-linting-and-import-sorting branch November 23, 2025 19:47
@github-project-automation github-project-automation bot moved this from Todo to Done in Explorer Revamp Nov 23, 2025
@rickstaa
Copy link
Member

Truly amazing! Thanks. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Add stricter linting and import sorting

4 participants