Skip to content
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

Enhance project structure with new configuration options and UI components #136

Merged
merged 7 commits into from
Jul 23, 2024

Conversation

thomasdavis
Copy link
Member

@thomasdavis thomasdavis commented Jul 23, 2024

Summary by CodeRabbit

  • New Features

    • Introduced new Button component for enhanced UI consistency in various applications.
    • Added TypeScript support with a new declaration file for Next.js environment.
  • Improvements

    • Enhanced script management with a new configuration option for executing pre and post scripts.
    • Updated global CSS imports and Tailwind configuration for better styling capabilities.
    • Improved rendering performance by adding unique key props to list items.
  • Dependency Updates

    • Renamed and reorganized dependencies to align with a new namespace structure.
    • Updated ESLint configuration to utilize a scoped package reference for better organization.
  • Documentation

    • New README file added for the @repo/ui package to guide users.
  • Bug Fixes

    • Corrected class names for consistent UI styling across components.

Copy link

vercel bot commented Jul 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jsonresume-org-homepage2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2024 8:24pm
jsonresume-org-registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2024 8:24pm

Copy link

changeset-bot bot commented Jul 23, 2024

⚠️ No Changeset found

Latest commit: ca33ae8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

alwaysmeticulous bot commented Jul 23, 2024

✅ Meticulous spotted zero visual differences across 52 screens tested: view results.

Expected differences? Click here. Last updated for commit ca33ae8. This comment will update as new commits are pushed.

Copy link
Contributor

coderabbitai bot commented Jul 23, 2024

Warning

Rate limit exceeded

@thomasdavis has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 22 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between db647e1 and ca33ae8.

Walkthrough

The recent changes enhance the project's structure and functionality by introducing scoped packages, improving UI component consistency, and establishing comprehensive TypeScript configurations. Key updates include new options in the .npmrc for script execution, refined dependency management in package.json files, and the implementation of a standardized ESLint configuration across various modules. These enhancements collectively streamline development and improve code maintainability throughout the repository.

Changes

File(s) Change Summary
.npmrc Introduced enable-pre-post-scripts option; corrected public-hoist-pattern formatting.
apps/homepage2/package.json Renamed dependencies: @jsonresume/ui to @repo/ui and eslint-config-custom to @repo/eslint-config-custom.
apps/registry/app/[username]/ProfileLayout.js Updated button styling with a new Button component; unified color schemes for icons and links.
apps/registry/app/components/ResumeEditor.js Changed import of Link from @jsonresume/ui to next/link for better Next.js integration.
apps/registry/app/components/SignIn.js Replaced standard button with a custom Button component for consistent styling.
apps/registry/app/layout.js Modified global CSS import to an absolute path pointing to @repo/ui/globals.css.
apps/registry/lib/formatters/template.js Commented out tailwind theme imports; removed associated functionality.
apps/registry/next-env.d.ts Introduced TypeScript declarations for Next.js environment.
apps/registry/next.config.mjs Switched from CommonJS to ES Module syntax; refined transpilePackages entry.
apps/registry/package.json Removed @jsonresume/ui; added new dependencies including @repo/ui and sonner.
apps/registry/postcss.config.mjs Created a new PostCSS config re-exporting from @repo/ui/postcss.config.
apps/registry/tailwind.config.ts New file re-exporting Tailwind CSS configuration from @repo/ui.
apps/registry/tsconfig.json Established a TypeScript configuration for Next.js with enhanced options.
packages/eslint-config-custom/package.json Updated package name to @repo/eslint-config-custom; added files array for publishing.
packages/ui/package.json Changed package name to @repo/ui; introduced scripts and multiple new dependencies.
packages/ui/src/components/ui/button.tsx Introduced customizable Button component with flexible styles.
packages/ui/src/components/ui/card.tsx Added a new card component structure for UI consistency.
packages/ui/src/components/ui/sonner.tsx Implemented a Toaster component for toast notifications integrated with theming.
packages/ui/src/globals.css Established foundational styles with Tailwind CSS, including theming variables.
packages/ui/src/lib/utils.js Introduced utility function cn for class name management.
packages/ui/tailwind.config.js Configured Tailwind CSS with custom animations and responsive design features.
themes/papirus/.eslintrc.cjs New ESLint configuration extending @repo/eslint-config-custom.
themes/stackoverflow/.eslintrc.cjs New ESLint configuration extending @repo/eslint-config-custom.
packages/jsonresume-theme-cv/.eslintrc.js New ESLint configuration extending @repo/eslint-config-custom.
packages/jsonresume-theme-tailwind/.eslintrc.js New ESLint configuration extending @repo/eslint-config-custom.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant ButtonComponent
    participant ToasterComponent

    User->>App: Clicks on Button
    App->>ButtonComponent: Render Button
    ButtonComponent-->>User: Displays Button
    User->>ButtonComponent: Triggers Action
    ButtonComponent->>ToasterComponent: Show Toast Notification
    ToasterComponent-->>User: Displays Toast
Loading

🐰 In a garden of code, where changes bloom bright,
New scripts and components take flight in delight.
From buttons to toasters, all styled with care,
A whimsical journey, we hop everywhere!
With packages neat and namespaces in tow,
Let's celebrate progress, let the good times flow! 🌼✨


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai bot changed the title @coderabbitai Enhance project structure with new configuration options and UI components Jul 23, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ee55934 and 7e2b2aa.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (33)
  • .npmrc (1 hunks)
  • apps/homepage2/package.json (2 hunks)
  • apps/registry/app/[username]/ProfileLayout.js (3 hunks)
  • apps/registry/app/components/ResumeEditor.js (1 hunks)
  • apps/registry/app/components/SignIn.js (2 hunks)
  • apps/registry/app/layout.js (1 hunks)
  • apps/registry/lib/formatters/template.js (2 hunks)
  • apps/registry/next-env.d.ts (1 hunks)
  • apps/registry/next.config.mjs (3 hunks)
  • apps/registry/package.json (2 hunks)
  • apps/registry/postcss.config.mjs (1 hunks)
  • apps/registry/tailwind.config.ts (1 hunks)
  • apps/registry/tsconfig.json (1 hunks)
  • package.json (1 hunks)
  • packages/eslint-config-custom/package.json (2 hunks)
  • packages/jsonresume-theme-cv/package.json (1 hunks)
  • packages/jsonresume-theme-professional/package.json (1 hunks)
  • packages/jsonresume-theme-standard/package.json (1 hunks)
  • packages/jsonresume-theme-tailwind/package.json (1 hunks)
  • packages/jsonresume-theme-tailwind/tailwind.config.js (1 hunks)
  • packages/ui/.eslintrc.js (1 hunks)
  • packages/ui/README.md (1 hunks)
  • packages/ui/components.json (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/postcss.config.mjs (1 hunks)
  • packages/ui/src/components/ui/button.tsx (1 hunks)
  • packages/ui/src/components/ui/card.tsx (1 hunks)
  • packages/ui/src/components/ui/sonner.tsx (1 hunks)
  • packages/ui/src/globals.css (1 hunks)
  • packages/ui/src/lib/utils.js (1 hunks)
  • packages/ui/tailwind.config.js (1 hunks)
  • packages/ui/tsconfig.json (1 hunks)
  • themes/stackoverflow/package.json (1 hunks)
Files skipped from review due to trivial changes (15)
  • apps/homepage2/package.json
  • apps/registry/app/layout.js
  • apps/registry/lib/formatters/template.js
  • apps/registry/next-env.d.ts
  • apps/registry/postcss.config.mjs
  • apps/registry/tailwind.config.ts
  • packages/jsonresume-theme-cv/package.json
  • packages/jsonresume-theme-professional/package.json
  • packages/jsonresume-theme-standard/package.json
  • packages/jsonresume-theme-tailwind/package.json
  • packages/ui/.eslintrc.js
  • packages/ui/README.md
  • packages/ui/postcss.config.mjs
  • packages/ui/src/globals.css
  • packages/ui/tsconfig.json
Additional comments not posted (55)
packages/ui/src/lib/utils.js (2)

1-2: Imports look good.

The clsx and twMerge imports are appropriate for merging class names.


4-6: Function cn is well-implemented.

The function cn correctly merges class names using clsx and twMerge.

.npmrc (2)

2-2: New configuration enable-pre-post-scripts is correctly added.

The new configuration enables the execution of pre and post scripts, which is useful for the postui:add command.


6-6: Formatting correction for public-hoist-pattern is appropriate.

The formatting correction for public-hoist-pattern improves readability and consistency.

packages/jsonresume-theme-tailwind/tailwind.config.js (2)

1-1: Importing fontFamily from Tailwind CSS default theme is correct.

The import statement correctly brings in the default fontFamily from Tailwind CSS.


7-11: Extending fontFamily with a custom sans-serif stack is well-implemented.

The addition of a custom sans-serif font stack under the extend section of the theme object is a good enhancement for typography.

packages/ui/components.json (5)

2-2: Schema URL is valid.

The URL for the schema appears to be correct and points to a valid location.


3-3: Style setting is valid.

The value "default" is a valid style setting.


4-5: RSC and TSX settings are valid.

Both settings are correctly configured.


6-12: Tailwind CSS configuration is valid.

The settings for Tailwind CSS are correctly configured.


13-16: Path aliases are valid.

The settings for path aliases are correctly configured.

apps/registry/tsconfig.json (4)

2-2: Base configuration is valid.

The value "tsconfig/nextjs.json" is a valid base configuration.


3-15: Compiler options are valid.

The settings for compiler options are correctly configured.


16-25: Include settings are valid.

The settings for included files and directories are correctly configured.


26-28: Exclude settings are valid.

The setting for excluded files and directories is correctly configured.

packages/eslint-config-custom/package.json (2)

3-3: Package name change is valid.

The change to a scoped package name is valid and aligns with common practices in package management.


12-16: Files array is valid.

The addition of the files array is valid and ensures that only the specified files are included in the package.

package.json (2)

10-10: LGTM! Addition of the "ui:add" script.

The new script enhances the functionality by providing a dedicated command for adding UI components.


14-14: LGTM! Modification of the "eslint-config-custom" dependency.

The change aligns with a scoped package structure, improving organization and clarity.

apps/registry/next.config.mjs (2)

1-1: LGTM! Restructuring the configuration export.

The change enhances compatibility with modern JavaScript tooling and practices.

Also applies to: 45-45


3-3: LGTM! Update of the transpilePackages entry.

The change indicates a shift in the package organization or structure, improving maintainability and clarity.

packages/ui/src/components/ui/sonner.tsx (1)

1-31: LGTM! Addition of the new Toaster component.

The component is well-structured and follows best practices.

However, ensure that the theme prop and the class names are used correctly.

Verification successful

LGTM! Addition of the new Toaster component.

The component is well-structured and follows best practices. The theme prop and class names are used correctly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the `theme` prop and class names in the `Toaster` component.

# Test: Search for the `theme` prop usage. Expect: Correct usage of the `theme` prop.
rg --type tsx -A 5 $'theme'

# Test: Search for the class names usage. Expect: Correct usage of the class names.
rg --type tsx -A 5 $'className'

Length of output: 113


Script:

#!/bin/bash
# Description: Verify the usage of the `theme` prop and class names in the `Toaster` component.

# Test: Search for the `theme` prop usage. Expect: Correct usage of the `theme` prop.
rg --glob '*.tsx' -A 5 'theme'

# Test: Search for the class names usage. Expect: Correct usage of the class names.
rg --glob '*.tsx' -A 5 'className'

Length of output: 42611

packages/ui/package.json (5)

2-4: LGTM! Package name change and private field addition.

The package name has been updated to @repo/ui and the private field ensures the package is for internal use only.


5-8: LGTM! New scripts addition.

The ui:add and lint scripts enhance the development workflow by providing commands for component management and code quality checks.


12-20: LGTM! DevDependencies update.

The new devDependencies support TypeScript and modern CSS features, and the renaming reflects a reorganization.


22-31: LGTM! Dependencies update.

The listed dependencies are necessary for the UI components and functionality.


32-45: LGTM! Expanded exports section.

The expanded exports section enhances the package's structure and usability, enabling better integration with other modules and components.

apps/registry/app/components/SignIn.js (1)

4-4: LGTM! Custom Button component integration.

The custom Button component enhances styling and behavior while maintaining form submission functionality.

Also applies to: 29-31

packages/ui/src/components/ui/button.tsx (5)

1-5: LGTM! Necessary imports.

The imports are necessary for the component's functionality and styling.


7-34: LGTM! Button variants definition.

The defined variants and sizes provide a flexible and customizable button component.


36-40: LGTM! ButtonProps interface.

The interface ensures type safety and flexibility for the button component.


42-52: LGTM! Button component implementation.

The component implementation is clean and leverages the defined variants for consistent styling.


54-56: LGTM! Component exports.

The exports make the button component and its variants available for use in other parts of the application.

packages/ui/src/components/ui/card.tsx (7)

5-17: LGTM!

The Card component is well-structured and correctly uses forwardRef to handle refs. The additional props are correctly spread onto the root div.


20-30: LGTM!

The CardHeader component is well-structured and correctly uses forwardRef to handle refs. The additional props are correctly spread onto the root div.


32-45: LGTM!

The CardTitle component is well-structured and correctly uses forwardRef to handle refs. The additional props are correctly spread onto the root h3.


47-57: LGTM!

The CardDescription component is well-structured and correctly uses forwardRef to handle refs. The additional props are correctly spread onto the root p.


59-65: LGTM!

The CardContent component is well-structured and correctly uses forwardRef to handle refs. The additional props are correctly spread onto the root div.


67-77: LGTM!

The CardFooter component is well-structured and correctly uses forwardRef to handle refs. The additional props are correctly spread onto the root div.


1-1: Verify the utility function import.

Ensure that the cn function from @repo/ui/lib/utils is correctly implemented and imported.

Verification successful

Verify the import statement for the cn function.

Ensure that the cn function in packages/ui/src/components/ui/card.tsx is imported from @repo/ui/lib/utils.


Re-run the import statement verification for the cn function with corrected regex.

Ensure that the cn function in packages/ui/src/components/ui/card.tsx is imported from @repo/ui/lib/utils.


Re-run the import statement verification for the cn function without specifying the file type.

Ensure that the cn function in packages/ui/src/components/ui/card.tsx is imported from @repo/ui/lib/utils.


The cn function is correctly imported.

The cn function in packages/ui/src/components/ui/card.tsx is correctly imported from @repo/ui/lib/utils.

  • packages/ui/src/components/ui/card.tsx: import { cn } from "@repo/ui/lib/utils"
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation and import of the `cn` function.

# Test: Search for the `cn` function in the specified path. Expect: Correct implementation and export.
rg --type js -A 5 $'export function cn'

Length of output: 415


Script:

#!/bin/bash
# Description: Verify the import statement for the `cn` function in card.tsx.

# Test: Search for the import statement in card.tsx. Expect: Correct import from '@repo/ui/lib/utils'.
rg --type tsx 'import { cn } from "@repo/ui/lib/utils"' packages/ui/src/components/ui/card.tsx

Length of output: 227


Script:

#!/bin/bash
# Description: Verify the import statement for the `cn` function in card.tsx.

# Test: Search for the import statement in card.tsx. Expect: Correct import from '@repo/ui/lib/utils'.
rg --type tsx 'import \{ cn \} from "@repo/ui/lib/utils"' packages/ui/src/components/ui/card.tsx

Length of output: 126


Script:

#!/bin/bash
# Description: Verify the import statement for the `cn` function in card.tsx.

# Test: Search for the import statement in card.tsx. Expect: Correct import from '@repo/ui/lib/utils'.
rg 'import \{ cn \} from "@repo/ui/lib/utils"' packages/ui/src/components/ui/card.tsx

Length of output: 127

packages/ui/tailwind.config.js (6)

1-1: LGTM!

The import statement for the tailwindcss-animate plugin is correct and necessary for the plugin usage.


3-11: LGTM!

The dark mode configuration is set to class-based, which is appropriate. The content paths are correctly specified to ensure Tailwind CSS processes the necessary files.


13-20: LGTM!

The theme container configuration is appropriate for consistent layout and spacing. The container is centered with specific padding and a maximum width for 2XL screens.


21-61: LGTM!

The theme extensions for colors and border radius values are appropriate for maintaining design consistency and flexibility.


62-75: LGTM!

The theme extensions for keyframes and animations are appropriate for adding custom animations to the project.


78-79: LGTM!

The inclusion of the tailwindcss-animate plugin in the plugins array is necessary for enabling the animations defined in the theme extensions.

themes/stackoverflow/package.json (1)

64-64: Verify the new package reference.

Ensure that the new package reference @repo/eslint-config-custom is correct and resolves properly.

Verification successful

The new package reference is correct.

The @repo/eslint-config-custom package is properly defined in the repository.

  • packages/eslint-config-custom/package.json
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new package reference.

# Test: Search for the package in the repository. Expect: Correct implementation and export.
rg --type json -A 5 $'"name": "@repo/eslint-config-custom"'

Length of output: 482

apps/registry/app/components/ResumeEditor.js (1)

8-8: LGTM! The import change aligns with Next.js practices.

The change from @jsonresume/ui/Link to next/link is appropriate for utilizing Next.js's client-side navigation and performance optimizations.

apps/registry/app/[username]/ProfileLayout.js (3)

10-10: LGTM! The import statement for Button is appropriate.

The addition of the Button component from @repo/ui/components/ui/button enhances UI consistency.


51-51: LGTM! The class name changes improve color scheme consistency.

The updates to text-primary for MapPin and the email link align with the new design guidelines.

Also applies to: 59-59


65-65: LGTM! The Button component usage enhances UI consistency.

The replacement of standard button elements with the Button component improves the overall UI consistency.

Also applies to: 70-72

apps/registry/package.json (4)

23-23: LGTM! The addition of @repo/ui dependency is appropriate.

The addition of @repo/ui enhances the project's UI components.


106-106: LGTM! The addition of sonner dependency is appropriate.

The addition of sonner enhances the project's capabilities.


113-113: LGTM! The addition of @repo/eslint-config-custom dependency is appropriate.

The addition of @repo/eslint-config-custom improves the project's linting configuration.


119-119: LGTM! The addition of tsconfig dependency is appropriate.

The addition of tsconfig enhances the project's TypeScript configurations.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 7e2b2aa and 1ce2b0d.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (11)
  • apps/homepage2/.eslintrc.js (1 hunks)
  • packages/eslint-config-custom/index.js (1 hunks)
  • packages/jsonresume-theme-cv/.eslintrc.js (1 hunks)
  • packages/jsonresume-theme-professional/.eslintrc.js (1 hunks)
  • packages/jsonresume-theme-standard/.eslintrc.js (1 hunks)
  • packages/jsonresume-theme-standard/package.json (1 hunks)
  • packages/jsonresume-theme-standard/src/ui/Projects.js (1 hunks)
  • packages/jsonresume-theme-tailwind/.eslintrc.js (1 hunks)
  • packages/ui/.eslintrc.js (1 hunks)
  • themes/papirus/.eslintrc.cjs (1 hunks)
  • themes/stackoverflow/.eslintrc.js (1 hunks)
Files skipped from review due to trivial changes (6)
  • packages/jsonresume-theme-cv/.eslintrc.js
  • packages/jsonresume-theme-professional/.eslintrc.js
  • packages/jsonresume-theme-tailwind/.eslintrc.js
  • packages/ui/.eslintrc.js
  • themes/papirus/.eslintrc.cjs
  • themes/stackoverflow/.eslintrc.js
Files skipped from review as they are similar to previous changes (1)
  • packages/jsonresume-theme-standard/package.json
Additional comments not posted (4)
packages/eslint-config-custom/index.js (1)

2-2: LGTM! Adding Next.js specific linting rules.

The addition of 'next' to the extends array enhances linting capabilities for Next.js projects.

packages/jsonresume-theme-standard/.eslintrc.js (1)

1-11: LGTM! New ESLint configuration file.

This new ESLint configuration file sets up a root configuration, extends a custom configuration, specifies a TypeScript parser, and overrides specific rules. This setup should help maintain code quality and consistency.

apps/homepage2/.eslintrc.js (1)

1-16: LGTM! Enhanced ESLint configuration.

The updated ESLint configuration sets the root property, extends a custom configuration, specifies a TypeScript parser, and adjusts rules and environments. These changes should improve linting capabilities and align the project with TypeScript and Node.js standards.

packages/jsonresume-theme-standard/src/ui/Projects.js (1)

28-28: Ensure that projects is always an array.

The projects prop should be validated to ensure it is always an array before mapping over it.

Ensure that the projects prop is always an array. Consider adding PropTypes validation.

import PropTypes from 'prop-types';

Projects.propTypes = {
  projects: PropTypes.array.isRequired,
};

return (
<div>
<div key={w.name}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Use a more unique key for the list items.

Using w.name as the key might not be unique enough if project names can be duplicated. Consider using a more unique identifier.

-  <div key={w.name}>
+  <div key={`${w.name}-${w.startDate}`}>
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div key={w.name}>
<div key={`${w.name}-${w.startDate}`}>

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Outside diff range, codebase verification and nitpick comments (1)
apps/registry/.eslintrc.js (1)

1-1: Reevaluate the need to disable ESLint for the entire file.

Disabling ESLint for the entire file might not be necessary with the new configuration. Consider enabling it to catch potential issues.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1ce2b0d and db647e1.

Files selected for processing (10)
  • apps/registry/.eslintrc.js (1 hunks)
  • packages/jsonresume-theme-cv/.eslintrc.js (1 hunks)
  • packages/jsonresume-theme-cv/src/ui/Experience.js (1 hunks)
  • packages/jsonresume-theme-cv/src/ui/Projects.js (2 hunks)
  • packages/jsonresume-theme-tailwind/src/ui/Experience.js (1 hunks)
  • packages/jsonresume-theme-tailwind/src/ui/Work.js (2 hunks)
  • packages/ui/src/components/ui/sonner.tsx (1 hunks)
  • themes/papirus/.eslintrc.cjs (1 hunks)
  • themes/papirus/src/style.js (2 hunks)
  • themes/stackoverflow/.eslintrc.cjs (1 hunks)
Files skipped from review due to trivial changes (4)
  • packages/jsonresume-theme-tailwind/src/ui/Experience.js
  • themes/papirus/.eslintrc.cjs
  • themes/papirus/src/style.js
  • themes/stackoverflow/.eslintrc.cjs
Files skipped from review as they are similar to previous changes (2)
  • packages/jsonresume-theme-cv/.eslintrc.js
  • packages/ui/src/components/ui/sonner.tsx
Additional comments not posted (7)
apps/registry/.eslintrc.js (4)

4-5: LGTM! Setting the configuration as the root and extending a custom configuration.

These changes help maintain consistency across the project.


6-6: LGTM! Adding the TypeScript parser.

This enhances the linting capabilities for TypeScript code.


9-9: Verify the necessity of disabling the '@next/next/no-sync-scripts' rule.

Disabling this rule allows for synchronous script loading in Next.js applications. Ensure this decision is intentional and necessary.


12-18: LGTM! Defining the environment settings.

These settings provide clarity on the expected execution context and help apply the appropriate linting rules.

packages/jsonresume-theme-cv/src/ui/Experience.js (1)

14-14: LGTM! Adding a key prop to the li element.

This change enhances React's ability to efficiently update and manage the list of experiences.

packages/jsonresume-theme-cv/src/ui/Projects.js (2)

13-15: LGTM! Adding a key prop to the li element.

This change enhances React's ability to efficiently update and manage the list of projects.


41-42: LGTM! Adding a key prop to the span element.

This change enhances React's ability to efficiently update and manage the list of highlights.

Comment on lines +42 to +43
{w.highlights?.map((h, index) => {
return <li key={index}>- {h}</li>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a unique identifier instead of index as the key.

Using index as the key can cause performance issues and bugs in React's reconciliation process if the list order changes. If h has a unique identifier, consider using that instead.

- return <li key={index}>- {h}</li>;
+ return <li key={h.id || index}>- {h}</li>;
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{w.highlights?.map((h, index) => {
return <li key={index}>- {h}</li>;
{w.highlights?.map((h, index) => {
return <li key={h.id || index}>- {h}</li>;

Comment on lines +8 to +10
{work.map((w, index) => {
return (
<Card key={w.company}>
<Card key={index}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a unique identifier instead of index as the key.

Using index as the key can cause performance issues and bugs in React's reconciliation process if the list order changes. If w has a unique identifier, consider using that instead.

- <Card key={index}>
+ <Card key={w.id || index}>
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{work.map((w, index) => {
return (
<Card key={w.company}>
<Card key={index}>
{work.map((w, index) => {
return (
<Card key={w.id || index}>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant