-
Notifications
You must be signed in to change notification settings - Fork 0
Add changeset and move Prettier after ESLint #266
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
🦋 Changeset detectedLatest commit: 94a033a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
📝 WalkthroughWalkthroughThis 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
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5–10 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
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)
.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
📒 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.
Summary by CodeRabbit