-
Notifications
You must be signed in to change notification settings - Fork 3
chore: bump version to 0.3.0, overhaul biome settings, add .env.example, add lint Github Action #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe project configuration has been updated with several modifications across multiple files. The Changes
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
38-41: Enhanced Environment Setup Instructions.The new code block clearly guides users to create a local
.envfile from the provided example, improving the onboarding process. For improved cross-platform clarity, consider adding a note for Windows users (e.g.,copy .env.example .env) so all users know the equivalent command in their environment.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
.env.example(1 hunks).github/workflows/build-and-lint.yml(1 hunks).github/workflows/build.yml(0 hunks).husky/pre-commit(1 hunks).lintstagedrc.js(0 hunks).lintstagedrc.json(1 hunks)LICENSE(1 hunks)README.md(1 hunks)biome.json(1 hunks)package.json(1 hunks)
💤 Files with no reviewable changes (2)
- .github/workflows/build.yml
- .lintstagedrc.js
✅ Files skipped from review due to trivial changes (4)
- LICENSE
- .lintstagedrc.json
- .env.example
- .husky/pre-commit
🚧 Files skipped from review as they are similar to previous changes (1)
- package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build
🔇 Additional comments (12)
.github/workflows/build-and-lint.yml (6)
1-2: Workflow Name Clarity
The workflow name "Build and Lint" is clear and effectively communicates the purpose of the job.
3-11: Trigger Configuration Verification
The "on:" block is well configured, triggering on both manual dispatch (workflow_dispatch) and pull request events with detailed types (opened, reopened, synchronize, ready_for_review). This ensures that the workflow runs at appropriate times during the PR lifecycle.
12-15: Concurrency Settings
The concurrency configuration using a dynamic group identifier (${{ github.workflow }}-${{ github.ref }}) coupled withcancel-in-progress: trueis a solid approach to prevent overlapping runs and improve resource efficiency.
16-43: Install Job Setup
The "install" job is properly structured:
- It uses the latest Ubuntu environment and correctly checks out the repository.
- Setting up Node.js with version "20" and caching npm dependencies is a best practice for reducing installation time.
- The caching step uses a key based on hashing the
package-lock.json, which is effective in ensuring cache validity.- The conditional installation (using
npm cionly if the cache is not hit) is correctly implemented.
Overall, the job is clear and efficient.
44-69: Lint Job Configuration
The "lint" job correctly depends on the "install" job and mirrors the initial steps:
- It checks out the repository, sets up Node.js, and restores npm cache using the same strategy as in the install job.
- The final step runs the linting command (
npm run check), which should align with the updated lint script in your package configuration.
This implementation is consistent and effective for ensuring code quality.
70-95: Build Job Configuration
The "build" job is structured in a similar pattern to the "lint" job, ensuring consistency:
- It depends on the "install" job, checks out the repository, and sets up Node.js with caching strategies in place.
- The core build step, executing
npm run build, is straightforward and should work provided that the build script is correctly defined in the project’s package.json.
This setup optimizes the build process through proper caching and job dependency management.biome.json (6)
2-7: Schema and VCS Configuration Update
The schema is updated to version"1.9.4"on line 2, and the VCS configuration explicitly disables VCS-based features by setting"enabled": false. Please verify that disabling VCS integrations is intentional for your project’s workflow.
8-11: File Ignore Patterns Updated
The"ignore"array now excludes common build and dependency directories ("dist/**/*","node_modules/**/*", and".next/**/*"), ensuring that transient or generated files are not processed by Biome. This update helps keep linting and formatting operations clean.
12-16: Formatter Configuration Adjustment
The formatter is now configured to use"space"for indentation with an"indentWidth"of2(lines 13–15). This change aligns with common style guides and improves code consistency. Please ensure that this is consistent with the overall project formatting standards.
17-19: Automatic Import Organization Enabled
The"organizeImports"section has been enabled (lines 17–19), which will help maintain tidy import statements automatically. This is a beneficial addition for code clarity and maintainability.
20-44: Enhanced Linter Rules
The linter configuration now includes several enhancements:
- Under
"suspicious"(lines 24–32), a new rule"noConsole"is added with"level": "error", while still permitting standard logging methods (i.e.,"error","warn","info","debug").- A new
"correctness"section (lines 39–42) enforces"noUnusedImports"and"noUnusedVariables"as errors, promoting cleaner code.These rules encourage best practices and help catch potential oversights. Please verify that these stricter lint rules match your team’s coding standards and process.
45-52: JavaScript Parsing and Formatting Adjustments
The JavaScript configuration now specifies a formatter using double quotes (line 47), which is a common style preference. Additionally, the parser option"unsafeParameterDecoratorsEnabled": true(line 50) has been enabled. Since enabling unsafe decorators can have implications on type safety and stability, please ensure that this experimental feature is necessary and that all team members are informed of its risks.
* Probably copied from the Request API Nest.js which uses decorators.
* We often omit useEffect dependencies, purposefully.
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (22)
src/components/ui/table.tsx (9)
16-17: Consistent Semicolon Usage in Table Component
The addition of semicolons after the closing of theforwardRefarrow function and the subsequentdisplayNameassignment improves code consistency across the codebase.
24-25: Standardized Termination in TableHeader Component
Appending semicolons after the component closure and thedisplayNameassignment ensures that the code adheres to the project's formatting guidelines.
36-37: Consistent Formatting in TableBody Component
The semicolon additions at the end of the component definition and display name assignment align this component’s style with others in the file.
51-52: Semicolon Addition in TableFooter Component
The added semicolons on the closing parenthesis and after thedisplayNameassignment help maintain uniform code style.
66-67: Standardization in TableRow Component
Ensuring that the component concludes with a semicolon and that thedisplayNameis properly terminated supports consistent formatting.
81-82: Consistent Syntax in TableHead Component
The inclusion of semicolons maintains the uniformity seen in other components, aiding in readability and maintenance.
93-94: Formatting Consistency in TableCell Component
By adding semicolons after the component closure and itsdisplayNameassignment, the code now follows a consistent style approach across similar UI components.
105-106: Uniform Termination in TableCaption Component
The semicolon usage here—both at the end of the component’s definition and after setting itsdisplayName—mirrors the style used throughout the file, ensuring consistency.
117-117: Final Export Statement Formatting
Appending a semicolon at the end of the export block standardizes the export syntax as per the project’s code style guidelines.src/app/layout.tsx (1)
29-32: Syntax Correction with Trailing Comma in Class Names
Adding a trailing comma aftermontserrat.variablein theclassNamearray enhances readability and maintainability without changing functionality.src/app/providers.tsx (1)
3-5: Standardized Client Directive and Import Order
Changing the"use client"directive to use double quotes and reordering the imports (placing theQueryClientimports beforeReact) improves consistency and clarity in the file’s structure.src/components/ui/avatar.tsx (6)
1-1: Consistent "use client" Directive
The addition of a semicolon and the use of double quotes for the"use client"directive now conform to the project's consistent coding style.
3-6: Standardized Import Statements
Reordering and adding semicolons to the import statements help ensure a uniform format across the project.
20-21: Consistent Termination in Avatar Component
The revised formatting, including proper semicolon termination after the component closure and thedisplayNameassignment, aligns with our project's code style guidelines.
32-33: Standardized Closure in AvatarImage Component
The changes that add consistent semicolon placement in theAvatarImagecomponent improve readability and maintain consistency with similar components.
47-48: Formatting Consistency in AvatarFallback Component
The semicolon addition after the component closure and its display name setup contributes to a consistent and predictable code style.
50-50: Final Export Statement Update
Appending a semicolon at the end of the export statement ensures that the file’s export syntax complies with project-wide formatting standards.src/lib/queries/transactions.ts (2)
5-5: Use Type-Only Import for Transaction
Switching to a type-only import forTransactionclarifies that it is used solely for type checking, eliminating any unnecessary runtime overhead.
77-78: Consistent Formatting in groupBy Function Call
Adding a trailing comma after the"channelId"parameter improves the readability of the argument list and aligns the code with our formatting best practices.src/lib/hooks/use-latest-payments.tsx (2)
38-38: State Initialization Suggestion
The state variableprefetchedDatais currently declared without an initial value. To avoid any potential issues with undefined values, consider initializing it explicitly withnull:- const [prefetchedData, setPrefetchedData] = useState<Payment[] | null>(); + const [prefetchedData, setPrefetchedData] = useState<Payment[] | null>(null);
49-62: useEffect Dependency Array Review
The useEffect hook depends only onpageeven though other variables such asfirst,pathname,replace, andsearchParamsare used within its scope. If these values are subject to change or aren’t guaranteed to be stable, consider adding them to the dependency array:- }, [page]); + }, [page, first, pathname, replace, searchParams]);src/lib/hooks/use-latest-srf-deployments.tsx (1)
38-40: State Initialization Consistency
The state forprefetchedDatais declared without an explicit initial value. For clarity and to prevent potential undefined behavior, initialize it withnull:- const [prefetchedData, setPrefetchedData] = useState<SingleRequestProxyDeployment[] | null>(); + const [prefetchedData, setPrefetchedData] = useState<SingleRequestProxyDeployment[] | null>(null);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
-
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (65)
-
.env.example(1 hunks) -
.github/workflows/build-and-lint.yml(1 hunks) -
.github/workflows/build.yml(0 hunks) -
.husky/pre-commit(1 hunks) -
.lintstagedrc.js(0 hunks) -
.lintstagedrc.json(1 hunks) -
LICENSE(1 hunks) -
README.md(1 hunks) -
biome.json(1 hunks) -
components.json(1 hunks) -
package.json(1 hunks) -
src/app/address/[id]/page.tsx(1 hunks) -
src/app/globals.css(1 hunks) -
src/app/layout.tsx(2 hunks) -
src/app/not-found/page.tsx(1 hunks) -
src/app/page.tsx(1 hunks) -
src/app/payments/page.tsx(1 hunks) -
src/app/providers.tsx(1 hunks) -
src/app/request/[id]/page.tsx(6 hunks) -
src/components/header.tsx(2 hunks) -
src/components/logo.tsx(1 hunks) -
src/components/main-nav.tsx(2 hunks) -
src/components/payment-table.tsx(4 hunks) -
src/components/recent-payment-table.tsx(2 hunks) -
src/components/recent-request-table.tsx(2 hunks) -
src/components/request-table.tsx(5 hunks) -
src/components/search-area.tsx(1 hunks) -
src/components/search.tsx(1 hunks) -
src/components/socials.tsx(1 hunks) -
src/components/srf-deployments-table.tsx(4 hunks) -
src/components/srf-info-section.tsx(1 hunks) -
src/components/stats-area.tsx(1 hunks) -
src/components/transactions-and-payments-table.tsx(3 hunks) -
src/components/ui/avatar.tsx(4 hunks) -
src/components/ui/badge.tsx(3 hunks) -
src/components/ui/button.tsx(2 hunks) -
src/components/ui/card.tsx(6 hunks) -
src/components/ui/dialog.tsx(9 hunks) -
src/components/ui/dropdown-menu.tsx(10 hunks) -
src/components/ui/input.tsx(2 hunks) -
src/components/ui/separator.tsx(2 hunks) -
src/components/ui/sheet.tsx(9 hunks) -
src/components/ui/skeleton.tsx(2 hunks) -
src/components/ui/table.tsx(9 hunks) -
src/components/ui/tabs.tsx(4 hunks) -
src/components/ui/version-badge.tsx(1 hunks) -
src/lib/consts.ts(2 hunks) -
src/lib/currency-manager.ts(1 hunks) -
src/lib/graphQlClient.ts(1 hunks) -
src/lib/hooks/use-address-payments.tsx(1 hunks) -
src/lib/hooks/use-address-requests.tsx(1 hunks) -
src/lib/hooks/use-export-pdf.tsx(3 hunks) -
src/lib/hooks/use-latest-payments.tsx(3 hunks) -
src/lib/hooks/use-latest-requests.tsx(3 hunks) -
src/lib/hooks/use-latest-srf-deployments.tsx(2 hunks) -
src/lib/queries/address-payments.ts(2 hunks) -
src/lib/queries/address-transactions.ts(3 hunks) -
src/lib/queries/channel.ts(3 hunks) -
src/lib/queries/payments.ts(1 hunks) -
src/lib/queries/request-payments.ts(2 hunks) -
src/lib/queries/srf-deployments.ts(1 hunks) -
src/lib/queries/transactions.ts(2 hunks) -
src/lib/queries/utils.ts(2 hunks) -
src/lib/utils.ts(7 hunks) -
tailwind.config.ts(1 hunks)
💤 Files with no reviewable changes (2)
- .lintstagedrc.js
- .github/workflows/build.yml
🧰 Additional context used
🧠 Learnings (1)
src/lib/queries/srf-deployments.ts (1)
Learnt from: aimensahnoun
PR: RequestNetwork/request-scan#74
File: src/lib/queries/srf-deployments.ts:218-232
Timestamp: 2025-01-02T11:51:08.073Z
Learning: The user aimensahnoun prefers returning an empty array instead of throwing errors in functions like fetchProxyDeploymentsByReference to avoid crashing the entire app.
🔇 Additional comments (145)
src/lib/currency-manager.ts (1)
3-3: Standardize Import Quotes
The import statement was updated to use double quotes, which maintains consistency with the project's style guidelines.LICENSE (1)
3-3: Update Copyright Year
The copyright notice has been updated to 2025, which reflects the current release cycle.components.json (1)
17-17: Minor Formatting Adjustment
The addition of a newline at the end of the JSON file improves file formatting and adheres to best practice conventions..husky/pre-commit (1)
1-2: Update Pre-commit Hook Command
Switching fromnpx lint-stagedtonpm run lint-stagedensures that the command leverages the defined npm script, keeping the invocation consistent with the other project tooling updates..lintstagedrc.json (1)
1-6: Introduce Lint-Staged Configuration
The new.lintstagedrc.jsoncorrectly sets up Biome to check and auto-fix files of various types. This addition enhances the project's linting process and aligns with the updated biome settings.src/components/ui/version-badge.tsx (1)
1-3: Organize Imports for ClarityThe reordering of import statements—specifically moving the
packageInfoimport to after theLinkimport—improves readability and aligns with the updated formatting standards. This change is purely cosmetic and does not affect functionality.src/components/socials.tsx (1)
3-6: Ensure Consistent String DelimitersUpdating the import from single to double quotes and setting the default parameter value (
color = "black") with double quotes increases consistency across the codebase. No functional changes are introduced.src/app/page.tsx (1)
1-4: Standardize Import StatementsThe changes to import declarations—now using double quotes and reordering component imports—enhance consistency with the project’s overall style. These adjustments have no impact on functionality.
src/components/ui/tabs.tsx (2)
1-7: Consistent Semicolon Usage in Top-Level DeclarationsThe addition of a semicolon after the
"use client"directive and in the import statements helps enforce a consistent syntax style throughout the file. This aligns well with the project’s updated code guidelines.
23-55: Standardized DisplayName and Export StatementsSemicolons have been added to the displayName assignments for
TabsList,TabsTrigger, andTabsContentas well as to the export statement. These changes improve consistency with the project’s styling without altering functional behavior.src/components/search-area.tsx (1)
3-4: Uniform Import Quote StyleUpdating the import statements to use double quotes (e.g.,
"next/image"and"./search") aligns with the project's new formatting standards. This change is stylistic and does not affect functionality.src/lib/graphQlClient.ts (1)
10-12: Stylistic Enhancement: Trailing Comma AdditionThe addition of a trailing comma after the fetch call parameters is a modern stylistic choice. It improves readability and simplifies future modifications without affecting functionality.
README.md (1)
38-41: Clear Setup Instruction AddedThe instruction to copy the
.env.examplefile (usingcp .env.example .env) makes the initial setup straightforward. This change helps new users properly configure their environment by reminding them to replace the placeholder values.src/lib/hooks/use-address-requests.tsx (2)
3-6: Consistent Import FormattingChanging the import statements to use double quotes (and adding type imports appropriately) aligns with the new code style guidelines. This enhances consistency across the codebase.
13-18: Standardized Query Key and Pagination CalculationThe queryKey now consistently uses a double-quoted string, and the pagination calculation (multiplying pageIndex with pageSize) is implemented correctly. No functional changes were introduced, so this standardization is beneficial.
src/app/not-found/page.tsx (1)
10-11: Standardize Quote Usage in ImportsUpdating the import statements to use double quotes improves overall code consistency across the application. This change is purely stylistic and does not affect functionality.
src/components/ui/skeleton.tsx (2)
1-2: Consistent Semicolon Usage in ImportsAdding semicolons to the import statements ensures consistency with the rest of the codebase. This minor stylistic change enhances code clarity.
12-16: Semicolon Addition in Return and ExportInserting semicolons at the end of the return block and at the export statement further enforces a consistent coding style throughout the file, aligning with the updated formatting guidelines.
src/lib/queries/srf-deployments.ts (1)
211-213: Looks good - trailing comma added for consistencyThis change improves code consistency by adding a trailing comma after the variables parameter, which aligns with modern JavaScript/TypeScript style conventions. Trailing commas create cleaner git diffs when parameters are added or removed in the future.
src/components/main-nav.tsx (3)
3-5: Approved: Quote style standardizationThe change from single quotes to double quotes in import statements aligns with the PR objective of standardizing formatting across the codebase.
14-14: Approved: Consistent string quotationStandardizing on double quotes for string literals improves consistency throughout the codebase.
19-19: Approved: String literal formatting standardizationThe consistent application of double quotes for all string literals improves code style uniformity.
Also applies to: 27-27
src/components/ui/separator.tsx (2)
1-7: Approved: Quote style and directive formattingConsistent application of double quotes for imports and proper quotation of the
use clientdirective improves code consistency.
14-29: Approved: Added semicolons and improved formattingThe addition of semicolons at line endings and improved formatting enhances code readability and consistency with the project's style conventions.
src/lib/queries/payments.ts (2)
3-7: Approved: Import statement standardizationThe change from single quotes to double quotes in import statements maintains consistency with the biome formatting standards being applied throughout the codebase.
5-5: Improved type clarity with explicit type importAdding the
typekeyword to the Payment import explicitly indicates this is a TypeScript type import rather than a value import, which is a good practice for clarity and potentially enables better tree-shaking.src/components/stats-area.tsx (1)
3-4: Import formatting changes look good.The imports have been updated with two main changes:
- Reordering of the icon imports in alphabetical order
- Changing from single quotes to double quotes in import paths
These formatting changes align with the PR's objective of applying new biome settings consistently across the codebase.
src/app/globals.css (1)
69-69: Adding newline at end of file is a good practice.Adding the newline character at the end of the file follows best practices and is consistent with coding standards. This small change improves file consistency and prevents potential issues with some tools that expect files to end with a newline.
src/components/ui/button.tsx (4)
1-3: Import statements reordered and formatted correctly.The import statements have been reorganized and properly formatted with:
- External imports first (Radix UI and class-variance-authority)
- React imports
- Internal imports (@/lib/utils)
This ordering follows standard import organization practices.
33-34: Proper semicolon placement adds consistency.Adding semicolons to close the object and function call improves code consistency and follows standard JavaScript/TypeScript formatting conventions.
39-39: Added missing semicolon for interface property.The interface property now has a proper semicolon at the end, which is consistent with TypeScript style conventions.
44-44: Consistent formatting for component implementation.The component implementation has been improved with:
- Addition of semicolons at line 44 for the variable assignment
- Proper indentation and semicolons for the return statement and function closing
- Consistent semicolon usage for the displayName assignment and export statement
These changes follow standard React component formatting practices.
Also applies to: 51-56
src/components/ui/input.tsx (2)
1-3: Import statements properly formatted.The import statements now include proper semicolons and follow the standard pattern of importing React first followed by internal utilities.
15-15: Improved formatting consistency in the Input component.The component implementation has been enhanced with:
- Proper formatting for the className parameter
- Consistent semicolon usage in the return statement closing
- Proper formatting and semicolons for the component definition
- Consistent semicolon for the displayName assignment and export statement
These changes align with standard React component formatting practices and ensure consistency throughout the codebase.
Also applies to: 20-25
src/lib/queries/address-payments.ts (2)
3-7: Imports have been updated to use double quotes and type importsThe changes to imports follow the new biome settings mentioned in the PR, using double quotes consistently and adding explicit type imports for better TypeScript practices.
180-180: String literals updated to use double quotesThe error message formatting has been updated to use double quotes, which is consistent with the PR's objective to align with the updated biome settings.
src/components/recent-request-table.tsx (2)
2-23: Import statements standardized to use double quotesAll import statements have been updated to use double quotes instead of single quotes, consistent with the formatting changes mentioned in the PR objectives.
76-76: JSX spacing and string literal updatedThe JSX spacing has been standardized to use double quotes for string literals, maintaining consistency with the rest of the codebase formatting.
src/lib/hooks/use-address-payments.tsx (2)
3-6: Imports updated to use double quotes and explicit type importsThe import statements have been standardized to use double quotes and explicit type imports, aligning with the biome settings update mentioned in the PR.
14-14: Query key string updated to use double quotesThe string literal for the query key has been changed from single quotes to double quotes, maintaining consistency with the new coding standards.
src/components/ui/badge.tsx (2)
1-4: Import statements updated with proper type annotationsThe imports have been reordered and updated to explicitly mark type imports, improving TypeScript type usage and following updated biome settings.
23-24: Added semicolons and standardized syntaxSemicolons have been consistently added to the end of statements, following the style guidelines updated in the PR for better code consistency.
Also applies to: 32-36
src/app/layout.tsx (1)
7-11: Reordered Import Statements for Readability
The reordering of imports—bringingHeader,cn,Suspense, andProvidersforward—improves the clarity of dependency organization and aligns with the overall code style improvements.src/components/header.tsx (1)
2-2: String delimiter standardization looks good.The changes from single quotes to double quotes align with the PR's goal of standardizing code formatting according to the updated biome settings.
Also applies to: 4-8, 18-18
src/components/search.tsx (1)
2-2: String delimiter standardization looks good.All string literals have been properly updated from single quotes to double quotes, maintaining consistent code style throughout the codebase.
Also applies to: 4-9, 13-13, 16-16, 24-24, 30-30
src/app/payments/page.tsx (1)
2-2: String delimiter standardization and import types look good.The changes from single quotes to double quotes are consistent with the PR's formatting goals. The addition of the
typekeyword in the import statement forPaginationStateis a good practice that explicitly indicates it's a TypeScript type import.Also applies to: 4-7
src/components/srf-deployments-table.tsx (3)
7-8: Import reordering looks good.The reordering of imports for
getFilteredRowModelandgetSortedRowModelimproves code organization.
186-186: Added trailing commas in function parameters look good.The addition of trailing commas in the
flexRenderfunction parameters is a good practice that makes future diffs cleaner when adding new parameters.Also applies to: 205-205
28-28: Import spacing looks good.The spacing adjustment for the Skeleton import follows consistent formatting.
src/lib/consts.ts (6)
3-3: Consistent Import Formatting
The import on line 3 now uses double quotes instead of single quotes, which aligns with the new code style guidelines.
5-19: Standardized Multi-line Import Block
The multi-line import from"viem/chains"now consistently uses double quotes, improving uniformity and readability.
21-36: Uniform String Literals in Constant Declarations
TheCHAINSobject now uses double quotes for its keys and string values. This change is purely stylistic and enhances consistency across the codebase.
38-53: Consistent Formatting for URL Mappings
TheCHAIN_SCAN_URLSobject has been updated to use double quotes for all URL strings. This consistent style improves maintainability.
55-70: Clean and Consistent Enum Declaration
ThePAYMENT_CHAINSenum is now formatted with double-quoted values, ensuring a uniform style with the rest of the file.
72-129: Public Clients Initialization is Clear
ThePUBLIC_CLIENTSobject initializes each public client with standardized formatting and consistent use of double quotes. There is no functional change, and the clarity of the client configuration is improved.src/components/ui/card.tsx (8)
1-4: Standardized Import Statements
The import statements for React and the utility functioncnnow end with semicolons and use double quotes, aligning with the project's formatting standards.
5-18: Component Definition and Display Name for Card
TheCardcomponent is defined usingReact.forwardRefand now explicitly sets itsdisplayName("Card"), which improves debugging and consistency.
20-30: Consistent Definition for CardHeader
TheCardHeadercomponent now includes a semicolon after its definition and properly sets itsdisplayName("CardHeader"). This change enhances code consistency across UI components.
32-45: Clear and Consistent CardTitle Component
TheCardTitlecomponent’s implementation, along with itsdisplayName("CardTitle"), is now formatted with semicolons and consistent spacing, adhering to the updated style guidelines.
47-57: Well-Formatted CardDescription Component
TheCardDescriptioncomponent properly utilizesReact.forwardRefand sets itsdisplayName("CardDescription"). The use of semicolons adds to the formatting consistency.
59-66: Concise CardContent Implementation
TheCardContentcomponent is concise and updated with appropriate semicolon usage and adisplayName("CardContent"), which are good for maintainability.
67-77: Consistent CardFooter Formatting
TheCardFootercomponent follows the same best practices as other components, with proper semicolon usage and the addition of adisplayName("CardFooter").
79-86: Enhanced Export Statement Consistency
The export statement now includes a trailing comma and is formatted consistently. This small change improves diff readability and adherence to code style standards..env.example (1)
1-3: New Environment Configuration Template
The newly added.env.examplefile defines essential environment variables (NEXT_PUBLIC_HASURA_GRAPHQL_URL,NEXT_PUBLIC_POLL_INTERVAL, andNEXT_PUBLIC_HASURA_GRAPHQL_JWT_TOKEN) using clear placeholder values. This file will help developers set up their local environments correctly.src/app/address/[id]/page.tsx (2)
2-17: Correct Use of Client Directive and Import Enhancements
The addition of"use client";(line 2) and the updated import statements (including the type import forPaginationStateon line 15) ensure proper execution in a client-rendered context while maintaining type clarity.
25-104: Well-Structured Address Page Component
TheAddressPagecomponent correctly utilizes state hooks, custom hooks (useAddressPaymentsanduseAddressRequests), and UI components to render the address details, payments, and requests. The overall readability and structure remain excellent with no functional changes.src/components/ui/dialog.tsx (8)
1-8: Consistent Import and Client Directives
The file now uses"use client";and semicolons at the end of all import statements, ensuring that the style is consistent with the rest of the codebase.
21-29: Robust DialogOverlay Component
TheDialogOverlaycomponent is correctly implemented usingReact.forwardRefand now consistently applies semicolon formatting and class concatenation viacn(). ThedisplayNameis appropriately set to match the underlying Radix UI component.
32-53: Clear DialogContent Implementation
TheDialogContentcomponent leverages theDialogPortalandDialogOverlay, and its styling classes are concatenated clearly. The inclusion of the semicolon in its display name setup enhances code clarity.
56-67: Well-Defined DialogHeader Component
TheDialogHeaderis written as a functional component with proper prop spreading and class merging. The added semicolon and explicitdisplayNameassignment ("DialogHeader") improve maintainability.
70-81: Consistent DialogFooter Component
TheDialogFootercomponent now uses standardized formatting and properly sets itsdisplayName("DialogFooter"). The formatting improvements add clarity without altering functionality.
84-96: Structured DialogTitle Component
TheDialogTitlecomponent, created withReact.forwardRef, is clear and concise. The changes for semicolon consistency and display name assignment maintain an optimal development standard.
99-109: Clean DialogDescription Component
TheDialogDescriptioncomponent is efficiently implemented with consistent semicolon usage and the properdisplayNameconfiguration. This enhances readability and aligns with the updated formatting standards.
111-123: Consistent Export of Dialog Components
The export block now includes a trailing comma, which improves future diffs and aligns with modern JavaScript/TypeScript styling conventions.tailwind.config.ts (10)
3-4: Consistent Import and Require Statements
The import now correctly uses a type-only import forConfigfrom Tailwind CSS, and the require call uses double quotes. This improves consistency across the configuration.
7-12: Standardized Configuration Strings
ThedarkModeoption and thecontentarray paths have been updated to use double quotes uniformly. Consistent string delimiters improve readability and reduce potential subtle errors.
14-14: Prefix Configuration Checked
Theprefixproperty is correctly set to an empty string using double quotes. No issues detected.
18-22: Container Settings and Padding
The container settings, including centering andpadding: "2rem", are correctly defined. The updates maintain consistency in how string values are represented.
25-29: Uniform Color Definitions
Color definitions in theextendsection now consistently use double quotes. This uniformity enhances the maintainability of the theme configuration.
59-63: Border Radius Definitions
TheborderRadiussettings correctly utilize calculations with CSS variables and consistently use double quotes. The approach is clear and idiomatic.
65-72: Keyframes for Accordion Animations
Keyframe definitions for "accordion-down" and "accordion-up" use clearfrom/toobject notation. Consistent string delimiters are maintained throughout the definitions.
75-77: Animation Declarations Verified
Animation properties correctly reference the keyframe names with appropriate easing and timing. There are no concerns with these changes.
79-80: Font Family Configuration
ThefontFamilysetting effectively combines a CSS variable with the default Tailwind sans fonts. This approach is clear and leverages the existing theme configuration.
83-84: Plugin Configuration Update
The plugins array now callsrequire("tailwindcss-animate")with double quotes, ensuring consistency in string formatting across the config file.src/components/transactions-and-payments-table.tsx (6)
10-12: Standardized Imports and Type-Only Usage
The import statements now use double quotes consistently, and the typesPaymentandTransactionare imported with thetypemodifier. This change enhances clarity and makes the intent explicit.
17-18: Utility and Link Import Updates
The grouped import for utility functions along with the separate import for theLinkcomponent now use consistent string delimiters, which aids readability.
61-65: Consistent JSX String Literals
Conditional rendering within JSX now uses double quotes for string literals (e.g."action"and"payment"). This aligns with the overall style convention adopted in the codebase.
107-115: Amount Formatting Logic Reviewed
The ternary expression selects between two calls togetAmountWithCurrencySymbol—one using a parsed value viaBigInt(item?.amountInCrypto || item?.amount || "0"). The logic is clear and robust in handling potential missing values.
117-124: Gas Fee Display Formatting
The conditional check for"gasUsed"in the item, along with the formatted result fromformatUnits, is implemented correctly. The fallback to an empty string if not applicable is a sensible approach.
125-127: Service Fee Rendering
The component correctly checks for the existence offeeAmounton the data object and displays it as needed. This conditional rendering is straightforward and effective.src/lib/hooks/use-latest-requests.tsx (5)
2-2: Client Directive Update
The directive"use client";is now properly included at the top of the file using double quotes. This ensures the hook is recognized as client-side by Next.js.
4-6: Reordered and Consistent Imports
The import statements have been reordered for logical grouping (client utilities, hooks, etc.) and standardized to use double quotes. This change enhances readability and organization.
46-52: useQuery Configuration Validated
The configuration object passed touseQuerynow defines the query key, query function, and options (such asrefetchInterval,placeholderData, andstaleTime) consistently using double quotes. The overall setup appears robust.
60-62: URL Parameter Update in useEffect
The use ofparams.set("page", page.toString())followed byreplace(${pathname}?${params.toString()})correctly updates the URL parameters. Consistent string delimiters are used, ensuring the code adheres to the project’s style guidelines.
54-67: Dependency Array Verification in useEffect
While the useEffect hook reacts to changes inpage, please verify if additional dependencies (likefirst,skip, orpollInterval) should be included to avoid any stale values when these props change.src/components/recent-payment-table.tsx (3)
2-2: Client-Side Directive Confirmed
The"use client";directive is correctly added at the top of the file. This change ensures that the component is rendered on the client side as intended.
4-11: Reordered and Consistent Import Statements
Import statements in this file have been updated to use double quotes, and type-only imports (e.g., forPayment) are now used where applicable. This improves both consistency and type clarity.
89-93: JSX Spacing Adjustment for TimeAgo
The adjustment to theTimeAgocomponent’s closing tag (using/>{" "}) is a minor formatting improvement to standardize spacing. The change does not affect functionality.src/lib/queries/address-transactions.ts (3)
4-6: Enhanced Type Safety and Address Handling
The addition ofgetAddressfrom the "viem" package and the conversion of theTransactionimport to a type-only import improve clarity and safety when handling addresses and transactions.
84-87: GraphQL Request Syntax Improvement
Adding a comma after theformatedVariablesargument in thegraphQLClient.requestcall enhances syntactic clarity. This small change supports proper argument formatting.
97-104: Ensuring Proper Grouping in Transaction Aggregation
The updated comma placed after"channelId"in thegroupByfunction call ensures that arguments are properly separated. This modification aids in maintaining correct syntax and predictable behavior.src/lib/hooks/use-latest-payments.tsx (2)
2-2: Client Directive Formatting
The"use client";directive now correctly uses double quotes, ensuring consistency with the rest of the codebase.
64-75: Memoization Structure Approved
The useMemo hook aggregates query results and related status flags in a clear and concise object. The implementation is sound and enhances performance by memoizing the returned value.src/lib/hooks/use-latest-srf-deployments.tsx (1)
73-74: Trailing Comma Formatting
The trailing comma added to the useMemo dependency array improves code readability and aligns with common formatting standards.src/lib/queries/request-payments.ts (1)
154-156: Consistent Error Logging
The error logging in the catch block now uses double quotes, ensuring consistency in string formatting across the codebase.src/components/ui/sheet.tsx (6)
1-9: Import and Directive Formatting
The file now uses consistent double quotes and semicolon-terminated import statements. This formatting update enhances readability and maintains a uniform style across the project.
18-30: SheetOverlay Component Enhancement
TheSheetOverlaycomponent correctly applies class names using thecnutility and properly passes down props with explicit semicolon usage. The assignment ofdisplayNameis also handled well.
75-90: SheetHeader and SheetFooter Formatting
The updated formatting for bothSheetHeaderandSheetFooterensures that class names are merged consistently with thecnhelper. These changes improve clarity without altering functionality.
105-116: SheetTitle Component Review
TheSheetTitlecomponent is neatly implemented usingReact.forwardRefwith clear displayName assignment, maintaining consistency with the rest of the UI components.
117-128: SheetDescription Component Review
TheSheetDescriptioncomponent shows a solid implementation with consistent formatting and proper use of React's forwardRef, along with a clear displayName assignment.
129-141: Export Statement Consistency
The final export block now utilizes explicit semicolon usage and a cleaner, more consistent formatting style, ensuring that all UI components are exported uniformly.package.json (1)
3-12: Version and Script Updates
The version bump to"0.3.0"along with the updated scripts for linting ("biome lint --write"), formatting ("biome format --write"), checking, and lint-staged are correctly applied. These changes align the project with the new tooling standards and help ensure a streamlined development workflow.src/lib/queries/channel.ts (3)
5-5: Type-Only Import Verification.
The import on this line now usesimport type, which clearly indicates thatChannelandTransactionare used only for type-checking. This enhances clarity and can help reduce bundle size.
71-82: Formatting Adjustment in Transaction Mapping (Storage).
Minor reformatting in the callback function (notably, the placement of the closing brace/comma) improves readability without affecting functionality.
91-102: Consistent Mapping Block Formatting (Storage Sepolia).
The formatting in the second mapping (forstorage_sepolia) has been adjusted to match the primary storage block. This consistency improves code maintainability.biome.json (3)
2-10: Updated Ignore Patterns and Schema Reference.
The configuration now explicitly ignores typical build and dependency directories (dist/**/*,node_modules/**/*, and.next/**/*), which should streamline tooling runs. Additionally, the schema reference is updated to a specific version for biome.
12-16: Formatter Configuration Refined.
The formatter settings now use spaces for indentation with a width of 2. This change promotes code consistency across the project.
20-45: Enhanced Linter Rules.
The linter section has been updated to include a newcorrectnesscategory—flagging unused imports/variables and disabling exhaustive dependency checks. The newnoConsolerule (with allowances for common console methods) further refines the linting process.src/lib/queries/utils.ts (2)
45-51: Parameter Formatting Enhancement.
A trailing comma has been added to the type declaration for thedataparameter. This minor formatting improvement makes subsequent diffs cleaner and aligns with modern TypeScript style guidelines.
57-61: Object Mapping Formatting Adjustment.
The reformatting of the mapped object (notably the placement of the closing brace/comma) improves readability. There is no change in the logic.src/components/srf-info-section.tsx (2)
2-2: Correct Use of Type-Only Import.
Switching to a type-only import forSingleRequestProxyDeploymentclearly indicates its purpose for type-checking only, which is a best practice in TypeScript projects.
4-6: Reordering of Import Statements.
The adjustments in the ordering ofLinkandformatUnitsenhance logical grouping and clarity of the imports. This reordering has no impact on functionality but improves maintainability.src/components/ui/dropdown-menu.tsx (3)
1-8: Standard Import and Client Declaration.
The addition of the"use client";directive at the top and ensuring that all import statements are properly terminated with semicolons brings the file in line with the new biome settings and improves overall code consistency.
21-183: Consistent Semicolon Usage and DisplayName Assignments.
Across the various Dropdown Menu components, semicolons have been consistently added to end statements and display name assignments. This standardization improves readability and enforces a uniform code style without altering functionality.
184-200: Clear and Clean Export Statement.
The export block at the end is now neatly organized and each exported member is consistently terminated, aligning with the project’s formatting updates.src/components/logo.tsx (2)
3-6: Improved type safety withtypeimports.The change to import React as a type is a good practice for components that only need React for type definitions, not for runtime use. Also consistent with the PR goal of standardizing to double quotes.
10-10: Consistent string literal formatting.String literals have been updated from single quotes to double quotes, aligning with the biome settings update mentioned in the PR objectives.
Also applies to: 15-15
src/components/request-table.tsx (6)
3-3: Standardized directive formatting.Consistent use of double quotes for the client directive aligns with the updated biome settings.
5-13: Enhanced type safety with explicit type imports.Using the
typekeyword forColumnDefandPaginationStateimproves build times and clearly distinguishes between values and types at import time. Also standardizes quote style to double quotes.
15-34: Standardized import formatting.All imports now consistently use double quotes, improving code style consistency as mentioned in the PR objectives.
38-58: Consistent string formatting in accessor definitions.All table column accessor keys and headers now use double quotes consistently. The string concatenation and object property access in the cell renderers have also been standardized.
Also applies to: 62-110
148-154: Standardized conditional checks.Status checks now consistently use double quotes, aligning with the formatting changes across the codebase.
190-191: Consistent attribute formatting.The
data-stateattribute now uses double quotes, maintaining consistency with the rest of the JSX attributes throughout the application.src/components/payment-table.tsx (5)
3-13: Enhanced type safety with explicit type imports.Adding the
typekeyword to import statements forColumnDefandPaginationStatehelps TypeScript distinguish between runtime values and compile-time types. This can improve build performance and code clarity.
15-35: Standardized import formatting.All imports have been updated to use double quotes consistently, aligning with the biome settings update mentioned in the PR objectives.
39-46: Consistent string formatting in table definitions.All accessor keys, headers, and returned string values now use double quotes consistently. This standardization improves code readability and maintenance.
Also applies to: 58-136
169-175: Standardized conditional checks.Status checks now consistently use double quotes, maintaining the same formatting patterns across the codebase.
211-212: Consistent attribute formatting.The
data-stateattribute now uses double quotes, aligning with other JSX attributes throughout the application.src/lib/hooks/use-export-pdf.tsx (2)
4-9: Enhanced type safety with explicit type imports.Converting
InvoiceandInvoiceItemto type imports explicitly indicates these are only used for type checking, not at runtime. This helps with code clarity and potentially improves build performance.
17-316: Comprehensive formatting and structure improvements.The function implementations have been reformatted with consistent indentation and spacing. The export content generation is now more readable with proper alignment. Despite the extensive formatting changes, the functional logic remains unchanged, which is appropriate for a minor version bump.
.github/workflows/build-and-lint.yml (1)
1-95: LGTM! Well-structured GitHub Actions workflow.The new build-and-lint workflow is well-designed with appropriate:
- Triggers for manual runs and PR events
- Concurrency configuration to avoid redundant runs
- Proper job dependencies between install, lint, and build
- Efficient caching for node_modules to speed up CI
- Consistent Node.js version usage across all jobs
src/app/request/[id]/page.tsx (3)
4-4: Appropriate component and hook imports.The new imports for SRFInfoSection, useExportPDF, fetchProxyDeploymentsByReference and Channel type are consistent with the code functionality and successfully support the SRF deployment feature at lines 380-384.
Also applies to: 15-15, 18-19
33-33: Good type-only import optimization.Changed the ActorInfo import to a type-only import, which is a best practice that helps with tree-shaking by ensuring type information doesn't affect the runtime bundle.
35-36: Re-added necessary component imports.The JsonEditor and TimeAgo component imports have been properly restored, which are used within the component's render logic.
Also applies to: 40-40
src/lib/utils.ts (1)
47-49: Style improvement with consistent trailing commas.Added trailing commas to function parameter lists, which is a good practice that improves git diffs when parameters are added later and follows modern JavaScript style conventions.
Also applies to: 68-72, 81-83, 124-126, 154-156, 161-163, 172-174
Description
I wanted to promote the latest bug fixes in Request Scan to production, but when I updated the version number, biome injected tabs which made me mad so I overhauled all "devops" stuff including biome settings, npm scripts, lint github action, and .env.example.
Changes
Reviewing Instructions
/srcdirectory andtailwind.config.ts. All of those changes are formatting/lint changes by biomeSummary by CodeRabbit