docs(organizeImports): revamp user-facing docs#9887
Conversation
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe documentation comment for the Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/biome_js_analyze/src/assist/source/organize_imports.rs`:
- Line 593: Fix the typo in the doc comment inside organize_imports.rs where the
sentence starts with "mports"—change it to "Imports" (capital I) so the comment
reads "Imports from the same source in the same chunk are merged when
possible:"; update the doc comment text near the organize_imports
module/function to correct the spelling and capitalization.
- Line 382: Fix the typo in the doc comment inside organize_imports.rs: change
"theh" to "the" in the sentence "To place them at the end, use theh following
configuration." so the comment reads "To place them at the end, use the
following configuration."; update the comment near the organize_imports
module/function documentation to correct this single-word misspelling.
- Line 182: Fix the doc comment in organize_imports.rs that currently reads '///
Setting `"type": false` matches only non-type imports anmd exports].' — correct
the typo "anmd" to "and" and remove the extraneous trailing ']' so it reads '///
Setting `"type": false` matches only non-type imports and exports.'; update the
comment next to the `Setting "type": false` doc line in the organize imports
code to reflect this change.
- Line 129: Typo in the documentation comment: change the word "soretd" to
"sorted" in the doc comment near the organize imports logic; locate the comment
string "/// ...is soretd as:" in organize_imports.rs (associated with the
organize imports functionality) and update it to "/// ...is sorted as:" so the
docs read correctly.
- Line 238: The doc comment in organize_imports.rs contains a typo "a `natural`
sort_" with an extra trailing underscore; edit the documentation string (near
the organize_imports module/any function or struct that contains this comment)
to remove the trailing underscore so it reads "a `natural` sort". Ensure only
the stray '_' after the backtick-enclosed word is deleted and formatting of the
surrounding comment remains unchanged.
- Line 687: The example doc comment contains an unterminated array literal in
the import-organizing example; fix it by closing the array literal (add the
missing closing bracket and any required trailing comma/semicolon) and ensure
the surrounding code block and Rust example are properly terminated so the
snippet compiles; locate the example in the organize_imports.rs documentation
comment and update the example array literal accordingly.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4e071327-008d-422f-9b60-07f6563f6a04
📒 Files selected for processing (1)
crates/biome_js_analyze/src/assist/source/organize_imports.rs
Merging this PR will not alter performance
Comparing Footnotes
|
|
The |
|
Maybe it works only for lint rules, and not assist actions. We can add |
e297288 to
6b36771
Compare
|
The remaining CI failures are caused by other merged PRs. |
Summary
This PR improves the docs of our import organizer.
The new docs is hopefully more user-centric and goal-oriented than the previous one.
The main structure is:
This work is based on #9762
Once merged I plan to submit the same PR on
mainwithout thesortBareimportsoption which was recently added tonext.Test Plan
CI should be green.
Docs
This is the purpose of this PR.