Skip to content

chore(docs): minor updates for contributing and skills#10098

Merged
dyc3 merged 1 commit into
mainfrom
dyc3/tweak-contrib-docs
Apr 23, 2026
Merged

chore(docs): minor updates for contributing and skills#10098
dyc3 merged 1 commit into
mainfrom
dyc3/tweak-contrib-docs

Conversation

@dyc3
Copy link
Copy Markdown
Contributor

@dyc3 dyc3 commented Apr 23, 2026

Summary

as requested in #10093. we already had most of the desired guidance in place, this just fixes some things i saw along the way.

Test Plan

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

⚠️ No Changeset found

Latest commit: b7db0b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Walkthrough

Two documentation updates that refine lint rule development guidance. The first generalises the generated lint-rule file path from JavaScript-specific locations to language-parameterized paths, and introduces a policy requiring all new lint rules to be placed in the nursery group with a patch-level changeset. The second enhances diagnostic pillar documentation with concrete examples, updates rule examples to use proper type signatures, and adjusts a multi-signal example type from mandatory to optional.

Possibly related PRs

Suggested labels

A-Project, A-Linter

Suggested reviewers

  • ematipico
  • Netail
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the documentation-only changes in CONTRIBUTING.md and skills documentation files.
Description check ✅ Passed The description is related to the changeset, referencing issue #10093 and explaining these are minor documentation fixes already largely in place.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dyc3/tweak-contrib-docs

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

Copy link
Copy Markdown
Contributor

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_analyze/CONTRIBUTING.md (1)

1010-1032: ⚠️ Potential issue | 🟠 Major

Fix the multi-signal example's return type.

The code declares type Signals = Option<Box<[Self::State]>> but returns a bare boxed slice without the outer Option wrapper. Additionally, the .map(|write| Some(range)) creates unwanted nested Options. The return should be Some(write_ranges.into_boxed_slice()) and the map should yield bare range values instead.

Suggested correction
         let write_ranges = write_references.into_iter().map(|write| {
             let syntax = write.syntax();
             let range = syntax.text_range();

-            Some(range)
+            range
         }).collect::<Vec<_>>();

-        write_ranges.into_boxed_slice()
+        Some(write_ranges.into_boxed_slice())
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_analyze/CONTRIBUTING.md` around lines 1010 - 1032, The example's
declared Signals type (type Signals = Option<Box<[Self::State]>>) doesn't match
the returned value: in run(...) you collect write_ranges as a boxed slice but
forget to wrap it in Some, and the map currently produces nested Options via
.map(|write| Some(range)); change the map to yield the bare range from
binding.all_writes(...) (e.g., .map(|write| write.syntax().text_range()) ) and
return Some(write_ranges.into_boxed_slice()) so run returns an
Option<Box<[Self::State]>> as declared.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/lint-rule-development/SKILL.md:
- Line 34: Update the document SKILL.md to fix the example scaffold path: find
the string
"crates/biome_<language>_analyze/src/lint/nursery/use_my_rule_name.rs" and
change it to include the missing lib/ segment so it reads
"crates/biome_<language>_analyze/lib/src/lint/nursery/use_my_rule_name.rs"; also
search the file for any other occurrences of the incorrect "/src/lint/" pattern
and correct them to "/lib/src/lint/" to ensure all contributor guidance points
to the actual scaffold location.

---

Outside diff comments:
In `@crates/biome_analyze/CONTRIBUTING.md`:
- Around line 1010-1032: The example's declared Signals type (type Signals =
Option<Box<[Self::State]>>) doesn't match the returned value: in run(...) you
collect write_ranges as a boxed slice but forget to wrap it in Some, and the map
currently produces nested Options via .map(|write| Some(range)); change the map
to yield the bare range from binding.all_writes(...) (e.g., .map(|write|
write.syntax().text_range()) ) and return Some(write_ranges.into_boxed_slice())
so run returns an Option<Box<[Self::State]>> as declared.
🪄 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: 1f66f340-0b91-472c-91ff-09141cc22299

📥 Commits

Reviewing files that changed from the base of the PR and between e316150 and b7db0b3.

📒 Files selected for processing (2)
  • .claude/skills/lint-rule-development/SKILL.md
  • crates/biome_analyze/CONTRIBUTING.md

```

This creates a file in `crates/biome_js_analyze/src/lint/nursery/use_my_rule_name.rs`
This creates a file in `crates/biome_<language>_analyze/src/lint/nursery/use_my_rule_name.rs`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix the generated rule file path (missing lib/).

Line 34 points contributors to .../src/lint/..., but the scaffolded rule files live under .../lib/src/lint/.... This is likely to send first-time contributors to the wrong folder.

Suggested doc fix
-This creates a file in `crates/biome_<language>_analyze/src/lint/nursery/use_my_rule_name.rs`
+This creates a file in `crates/biome_<language>_analyze/lib/src/lint/nursery/use_my_rule_name.rs`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This creates a file in `crates/biome_<language>_analyze/src/lint/nursery/use_my_rule_name.rs`
This creates a file in `crates/biome_<language>_analyze/lib/src/lint/nursery/use_my_rule_name.rs`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/lint-rule-development/SKILL.md at line 34, Update the
document SKILL.md to fix the example scaffold path: find the string
"crates/biome_<language>_analyze/src/lint/nursery/use_my_rule_name.rs" and
change it to include the missing lib/ segment so it reads
"crates/biome_<language>_analyze/lib/src/lint/nursery/use_my_rule_name.rs"; also
search the file for any other occurrences of the incorrect "/src/lint/" pattern
and correct them to "/lib/src/lint/" to ensure all contributor guidance points
to the actual scaffold location.

@github-actions github-actions Bot added the A-Linter Area: linter label Apr 23, 2026
@dyc3 dyc3 merged commit 4a0b977 into main Apr 23, 2026
26 checks passed
@dyc3 dyc3 deleted the dyc3/tweak-contrib-docs branch April 23, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants