cleanOutput and @@meta('doc:ignore', true)#16
cleanOutput and @@meta('doc:ignore', true)#16lsmith77 wants to merge 5 commits intosheldonj:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
✅ Files skipped from review due to trivial changes (5)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/generator.ts`:
- Around line 47-61: The cleanOutput block around pluginOptions.cleanOutput
should be updated to satisfy ESLint: change the thrown Error message to use
single quotes in the Error constructor where the root check throws; insert a
blank line before the fs.existsSync(outputDir) check; reorder the fs.rmSync
options so that force comes before recursive; and rename the catch parameter
from err to error and update its usage in the thrown Error message that follows
(keep using outputDir and the same conditional error.message extraction). Refer
to pluginOptions.cleanOutput, outputDir, root, fs.existsSync, and fs.rmSync to
locate and adjust the code.
- Line 346: The object literal currently sets properties in the wrong
alphabetical order for the perfectionist/sort-objects rule: move the cleanOutput
property so it appears before the output property (i.e., ensure cleanOutput:
raw['cleanOutput'] === true is placed earlier than the output property in the
same object literal), keeping the existing expression and surrounding object
intact so only the property order changes.
In `@src/types.ts`:
- Around line 91-95: Reorder the object type properties so they satisfy
perfectionist/sort-object-types by moving the cleanOutput property to appear
alphabetically before title within the same type declaration (i.e., place
cleanOutput above title in the type that currently contains cleanOutput and
title); ensure no other property order is changed and run the linter to verify
the sort rule passes.
In `@test/generator/plugin-options.test.ts`:
- Around line 1-31: The test file has lint/format violations: reorder imports so
relative import "../utils" appears before the built-in "node:path" import,
convert all double quotes to single quotes across the file, and reorder the
pluginOptions object passed to plugin.generate so the cleanOutput property
appears before output (i.e., change pluginOptions: { cleanOutput: true, output:
tmpDir }), keeping references to loadSchema and plugin.generate intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 035a089e-1144-4a29-813a-8c5e50664786
⛔ Files ignored due to path filters (1)
test/generator/__snapshots__/snapshot.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (4)
src/generator.tssrc/types.tstest/generator/plugin-options.test.tstest/generator/snapshot.test.ts
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…eInternalModels
fixes #10
fixes #15
Summary by CodeRabbit
New Features
Behavior Changes
Documentation
Tests