Skip to content

Conversation

@TheCodeDestroyer
Copy link
Owner

@TheCodeDestroyer TheCodeDestroyer commented May 31, 2025

Summary by CodeRabbit

  • New Features

    • Expanded support for additional import path alias formats in code formatting.
    • Added new style-related import groups for improved import order handling.
  • Chores

    • Updated documentation to clarify usage of Prettier configurations for CommonJS and ES Module projects.

@changeset-bot
Copy link

changeset-bot bot commented May 31, 2025

🦋 Changeset detected

Latest commit: fb797dc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@tcd-devkit/prettier-config-react Minor
@tcd-devkit/prettier-config Minor

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link

coderabbitai bot commented May 31, 2025

📝 Walkthrough
## Walkthrough

Changeset files were added to document updates for the `@tcd-devkit/prettier-config` and `@tcd-devkit/prettier-config-react` packages. The updates expand import order configurations with additional alias prefixes and style-related groups, and clarify README instructions for importing Prettier configurations in different module systems.

## Changes

| File(s)                                                          | Change Summary                                                                                                    |
|------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| .changeset/polite-teeth-change.md                                | Added a changeset documenting a patch update for `@tcd-devkit/prettier-config`.                                  |
| .changeset/eighty-jeans-train.md                                 | Added a changeset documenting minor version bumps and README improvements for `@tcd-devkit/prettier-config-react` and `@tcd-devkit/prettier-config`. |
| packages/prettier/prettier-config/src/base.formatter.ts          | Expanded import order regex patterns to include new alias prefixes and added groups for style-related imports.    |
| packages/prettier/prettier-config/README.md                      | Clarified usage instructions for importing Prettier config with separate examples for CommonJS and ES Modules.    |
| packages/prettier/prettier-config-react/README.md                | Updated README to clarify how to import and use Prettier config with explicit CommonJS and ES Module examples.    |

## Poem

> In the warren of code, neat and bright,  
> New paths for imports hop into sight.  
> Styles and aliases, all in a row—  
> Prettier’s order now helps them flow.  
> With every patch, the garden grows,  
> As tidy as a rabbit’s prose! 🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

Scope: all 4 workspace projects
/tmp/eslint/packages/eslint-presets/eslint-preset-node:
 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In packages/eslint-presets/eslint-preset-node: "@tcd-devkit/eslint-config@workspace:*" is in the dependencies but no package named "@tcd-devkit/eslint-config" is present in the workspace

This error happened while installing a direct dependency of /tmp/eslint/packages/eslint-presets/eslint-preset-node

Packages found in the workspace:

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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 Expand import order and add style groups in Prettier config May 31, 2025
Copy link

@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

🧹 Nitpick comments (1)
.changeset/polite-teeth-change.md (1)

5-5: Fix pluralization in changeset summary
The summary reads “Add more alternative for import order path aliases and add styles aliases”. It should be pluralized and streamlined, for example:
“Add more alternatives for import order path aliases and add style aliases.”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~5-~5: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...t/prettier-config': patch --- Add more alternative for import order path aliases and add s...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c01dd40 and 4f8dfb1.

📒 Files selected for processing (2)
  • .changeset/polite-teeth-change.md (1 hunks)
  • packages/prettier/prettier-config/src/base.formatter.ts (1 hunks)
🧰 Additional context used
🪛 LanguageTool
.changeset/polite-teeth-change.md

[uncategorized] ~5-~5: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...t/prettier-config': patch --- Add more alternative for import order path aliases and add s...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)

🔇 Additional comments (1)
packages/prettier/prettier-config/src/base.formatter.ts (1)

48-57: Consistent expansion of import alias prefixes
The configuration correctly adds support for the bare-@alias variant alongside the existing @/alias and #alias forms for all major groups (shared, server, actions, client, components, public). This change aligns with the PR objective to recognize additional path-alias prefixes and maintains consistency across groups.

@TheCodeDestroyer TheCodeDestroyer force-pushed the improve-prettier-config branch from 4f8dfb1 to fb797dc Compare May 31, 2025 17:07
Copy link

@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

🧹 Nitpick comments (1)
.changeset/polite-teeth-change.md (1)

5-5: Fix grammatical errors in the changeset summary.

The description should use the plural form for "alternatives" and make "style aliases" consistent. For example:

-Add more alternative for import order path aliases and add styles aliases
+Add more alternatives for import order path aliases and add style aliases
🧰 Tools
🪛 LanguageTool

[uncategorized] ~5-~5: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...t/prettier-config': patch --- Add more alternative for import order path aliases and add s...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f8dfb1 and fb797dc.

📒 Files selected for processing (5)
  • .changeset/eighty-jeans-train.md (1 hunks)
  • .changeset/polite-teeth-change.md (1 hunks)
  • packages/prettier/prettier-config-react/README.md (1 hunks)
  • packages/prettier/prettier-config/README.md (1 hunks)
  • packages/prettier/prettier-config/src/base.formatter.ts (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • packages/prettier/prettier-config-react/README.md
  • .changeset/eighty-jeans-train.md
  • packages/prettier/prettier-config/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/prettier/prettier-config/src/base.formatter.ts
🧰 Additional context used
🪛 LanguageTool
.changeset/polite-teeth-change.md

[uncategorized] ~5-~5: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...t/prettier-config': patch --- Add more alternative for import order path aliases and add s...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: main

@TheCodeDestroyer TheCodeDestroyer merged commit e659f4b into main May 31, 2025
3 checks passed
@TheCodeDestroyer TheCodeDestroyer deleted the improve-prettier-config branch May 31, 2025 17:09
@github-actions github-actions bot mentioned this pull request May 31, 2025
TheCodeDestroyer added a commit that referenced this pull request May 31, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @tcd-devkit/prettier-config@0.2.0

### Minor Changes

- [#28](#28)
[`fb797dc`](fb797dc)
Thanks [@TheCodeDestroyer](https://github.com/TheCodeDestroyer)! -
Update README with better info

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

- [#28](#28)
[`8bb895d`](8bb895d)
Thanks [@TheCodeDestroyer](https://github.com/TheCodeDestroyer)! - Add
more alternative for import order path aliases and add styles aliases

## @tcd-devkit/prettier-config-react@0.1.0

### Minor Changes

- [#28](#28)
[`fb797dc`](fb797dc)
Thanks [@TheCodeDestroyer](https://github.com/TheCodeDestroyer)! -
Update README with better info

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

- Updated dependencies
\[[`c3d7ba9`](c3d7ba9),
[`fb797dc`](fb797dc),
[`8bb895d`](8bb895d)]:
    -   @tcd-devkit/prettier-config@0.2.0

## @tcd-devkit/commitlint-config@0.2.1

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

## @tcd-devkit/eslint-preset-next@0.1.2

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

- Updated dependencies
\[[`4c61660`](4c61660),
[`c3d7ba9`](c3d7ba9),
[`3e1ce4c`](3e1ce4c),
[`19ab564`](19ab564)]:
    -   @tcd-devkit/eslint-config-next@0.1.2
    -   @tcd-devkit/eslint-config-a11y@0.1.1
    -   @tcd-devkit/eslint-config-import-ts@0.1.2
    -   @tcd-devkit/eslint-config-react-hooks@0.0.2
    -   @tcd-devkit/eslint-config-react@0.1.1
    -   @tcd-devkit/eslint-config-ts@0.1.1
    -   @tcd-devkit/eslint-config@0.1.1

## @tcd-devkit/eslint-preset-node@0.1.2

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

- Updated dependencies
\[[`c3d7ba9`](c3d7ba9),
[`19ab564`](19ab564)]:
    -   @tcd-devkit/eslint-config-import-ts@0.1.2
    -   @tcd-devkit/eslint-config-ts@0.1.1
    -   @tcd-devkit/eslint-config@0.1.1

## @tcd-devkit/eslint-config@0.1.1

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

## @tcd-devkit/eslint-config-a11y@0.1.1

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

## @tcd-devkit/eslint-config-import@0.1.2

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

## @tcd-devkit/eslint-config-import-ts@0.1.2

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

- [#27](#27)
[`19ab564`](19ab564)
Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps):
update typescript-eslint monorepo to v8.33.0

- Updated dependencies
\[[`c3d7ba9`](c3d7ba9)]:
    -   @tcd-devkit/eslint-config-import@0.1.2

## @tcd-devkit/eslint-config-next@0.1.2

### Patch Changes

- [#22](#22)
[`4c61660`](4c61660)
Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps):
update dependency @next/eslint-plugin-next to v15.4.0-canary.53

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

- [#26](#26)
[`3e1ce4c`](3e1ce4c)
Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps):
update dependency @next/eslint-plugin-next to v15.4.0-canary.55

## @tcd-devkit/eslint-config-react@0.1.1

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

## @tcd-devkit/eslint-config-react-hooks@0.0.2

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

## @tcd-devkit/eslint-config-ts@0.1.1

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

- [#27](#27)
[`19ab564`](19ab564)
Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps):
update typescript-eslint monorepo to v8.33.0

## @tcd-devkit/scripts@0.1.2

### Patch Changes

- [#24](#24)
[`bb6f55c`](bb6f55c)
Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps):
update dependency execa to v9.6.0

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

## @tcd-devkit/tsup-config@0.0.2

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23

## @tcd-devkit/internal-utils@0.0.2

### Patch Changes

- [#25](#25)
[`c3d7ba9`](c3d7ba9)
Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps):
update dependency @types/node to v22.15.23
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.

2 participants