Skip to content

Conversation

@TheCodeDestroyer
Copy link
Owner

@TheCodeDestroyer TheCodeDestroyer commented Nov 5, 2025

Summary by CodeRabbit

  • Chores
    • Updated lint execution sequence for @tcd-devkit/scripts, adjusting the order in which code formatting validation runs relative to other lint checks.

@changeset-bot
Copy link

changeset-bot bot commented Nov 5, 2025

🦋 Changeset detected

Latest commit: 94a033a

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

This PR includes changesets to release 1 package
Name Type
@tcd-devkit/scripts 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 Nov 5, 2025

📝 Walkthrough

Walkthrough

This PR adds a changeset file and reorders the execution sequence in the lint command, moving the Prettier formatting step to run after ESLint instead of before it.

Changes

Cohort / File(s) Summary
Changeset declaration
.changeset/witty-icons-shave.md
New changeset file declaring a minor version bump for @tcd-devkit/scripts with a note about the lint command execution order change.
Lint command reordering
packages/scripts/src/commands/lint.command.ts
Reorders Prettier to execute after ESLint, maintaining all conditional logic and overall success aggregation unchanged.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Lint
    participant ESLint
    participant Prettier
    participant TSC

    User->>Lint: Run lint command
    
    rect rgb(230, 240, 255)
    Note over Lint,TSC: Before (Old Execution Order)
    Lint->>ESLint: Run ESLint
    ESLint-->>Lint: Results
    Lint->>Prettier: Conditionally run Prettier
    Prettier-->>Lint: Results
    Lint->>TSC: Run TSC
    TSC-->>Lint: Results
    end
    
    rect rgb(240, 255, 240)
    Note over Lint,TSC: After (New Execution Order)
    Lint->>ESLint: Run ESLint
    ESLint-->>Lint: Results
    Lint->>TSC: Run TSC
    TSC-->>Lint: Results
    Lint->>Prettier: Conditionally run Prettier
    Prettier-->>Lint: Results
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

  • The change is straightforward code reordering with no new logic introduced
  • Primary review focus: Verify the execution order change is intentional and doesn't create logical issues with exit codes or error handling between steps

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title '@coderabbitai' is not descriptive of the actual changes made in the pull request, which involve reordering the Prettier and ESLint execution steps in the lint command. Replace the title with a descriptive summary of the main change, such as 'Reorder Prettier and ESLint execution in lint command' or 'Fix script execution order in lint command'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-script-order

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot changed the title @coderabbitai Add changeset and move Prettier after ESLint Nov 5, 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: 0

🧹 Nitpick comments (1)
.changeset/witty-icons-shave.md (1)

1-5: Consider a more descriptive changeset message.

While the current message is acceptable, it could be more specific about what changed and why it matters.

Example enhancement:

 ---
 '@tcd-devkit/scripts': minor
 ---
 
-Changed order of execution when running lint
+Changed lint execution order: ESLint now runs before Prettier check (previously ran after)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41a2348 and 94a033a.

📒 Files selected for processing (2)
  • .changeset/witty-icons-shave.md (1 hunks)
  • packages/scripts/src/commands/lint.command.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: TheCodeDestroyer
Repo: TheCodeDestroyer/devkit PR: 5
File: packages/internal-utils/src/test.utils.ts:0-0
Timestamp: 2025-05-23T18:45:38.179Z
Learning: TheCodeDestroyer prefers consistent API design and likes to use unified interface names when functions share similar option patterns, even if some properties aren't used by all functions.
Learnt from: TheCodeDestroyer
Repo: TheCodeDestroyer/devkit PR: 5
File: packages/eslint/eslint-config-import-ts/package.json:65-67
Timestamp: 2025-05-23T19:34:31.271Z
Learning: TheCodeDestroyer prefers to use Renovate for automated dependency management rather than manual dependency version updates in package.json files.
Learnt from: TheCodeDestroyer
Repo: TheCodeDestroyer/devkit PR: 7
File: renovate.json:2-4
Timestamp: 2025-05-25T09:20:16.838Z
Learning: TheCodeDestroyer prefers using local Renovate presets with the "local>" syntax to avoid external fetches, rather than GitHub-based presets.
Learnt from: TheCodeDestroyer
Repo: TheCodeDestroyer/devkit PR: 5
File: package.json:13-16
Timestamp: 2025-05-23T18:52:37.598Z
Learning: TheCodeDestroyer uses Turbo for all development task orchestration in the monorepo, with proper commands defined in turbo.json rather than npm scripts. They prefer `turbo run` commands over direct npm script execution for development workflows.
📚 Learning: 2025-05-23T18:25:39.851Z
Learnt from: TheCodeDestroyer
Repo: TheCodeDestroyer/devkit PR: 5
File: packages/eslint/eslint-config-react/package.json:80-80
Timestamp: 2025-05-23T18:25:39.851Z
Learning: The tcd-devkit ESLint configuration packages (like eslint-config-react) are built from scratch specifically for ESLint v9+ using the flat config format, not migrated from older ESLint versions.

Applied to files:

  • .changeset/witty-icons-shave.md
🧬 Code graph analysis (1)
packages/scripts/src/commands/lint.command.ts (1)
packages/scripts/src/utils/cli.utils.ts (1)
  • runPrettier (122-150)
🔇 Additional comments (1)
packages/scripts/src/commands/lint.command.ts (1)

43-45: LGTM! Execution order now follows best practices.

Moving Prettier to run after ESLint aligns with conventional linting workflows (ESLint → Prettier → TSC). Since Prettier runs in check mode, it won't modify code that ESLint has already validated. The &&= operator ensures all checks complete regardless of earlier failures, so the order change is safe.

@TheCodeDestroyer TheCodeDestroyer merged commit 68c229c into main Nov 5, 2025
3 checks passed
@TheCodeDestroyer TheCodeDestroyer deleted the fix-script-order branch November 5, 2025 17:03
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