Skip to content

fix: codegen#3598

Merged
ematipico merged 1 commit intomainfrom
fix/synch
Dec 5, 2025
Merged

fix: codegen#3598
ematipico merged 1 commit intomainfrom
fix/synch

Conversation

@ematipico
Copy link
Member

Summary

@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for biomejs failed. Why did it fail? →

Name Link
🔨 Latest commit 0cb94a3
🔍 Latest deploy log https://app.netlify.com/projects/biomejs/deploys/6932fb894e4e8d0008811c6e

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale File Note
en src/content/docs/linter/domains.mdx Source changed, localizations will be marked as outdated.
en src/content/docs/linter/javascript/rules.mdx Source changed, localizations will be marked as outdated.
en src/content/docs/linter/json/rules.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

Walkthrough

This pull request introduces two new linter rules—useAwaitThenable and useDestructuring—with corresponding documentation pages and configuration references. The underlying analysis pipeline is refactored to use structured service objects (JsonAnalyzeServices and CssAnalyzerServices) instead of raw arguments in the codegen. Biome dependency crates are updated to a new git revision with expanded feature sets. URL redirects are added for the new rule documentation pages, and existing documentation for noBiomeFirstException is broadened to cover general glob pattern misuse guidance.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is empty—only a template placeholder with no substantive explanation of motivation or the problems being solved. Please provide a meaningful description explaining why these changes are being made, what problems they solve, and how they benefit the codebase.
Title check ❓ Inconclusive The title 'fix: codegen' is vague and overly broad, providing minimal insight into the actual changes across multiple files and systems. Consider a more specific title that reflects the primary change, such as 'refactor: migrate JSON and CSS analyzers to services-based interface' or similar.
✨ 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/synch

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

@ematipico ematipico merged commit c163717 into main Dec 5, 2025
4 of 5 checks passed
@ematipico ematipico deleted the fix/synch branch December 5, 2025 15:37
Copy link
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: 0

Caution

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

⚠️ Outside diff range comments (1)
src/content/docs/linter/rules/no-biome-first-exception.mdx (1)

32-88: Tighten wording in heading and “files/folder” sentence

The content and examples look spot on, but there are a couple of small text nits:

  • The heading “Leading of negated patterns” reads a bit awkwardly; something like “Leading negated patterns” would be more natural.
  • The sentence “declare the files/folder to include first, and then the files/folder to ignore” would read better as “files and folders” (or “files/folders”) in both places.

If you tweak those in the generator, the page will read much more smoothly.

🧹 Nitpick comments (3)
src/content/docs/linter/rules/use-await-thenable.mdx (1)

46-51: Optional wording polish in the limitation note

The caution about only checking the global Promise is very helpful. If you fancy trimming the prose, you could change “At the moment, this rule only checks…” to “Currently, this rule only checks…”, which reads a touch leaner without changing the meaning.

Pure bikeshedding; the rest of the page reads well and is technically clear.

src/content/docs/linter/javascript/rules.mdx (1)

202-204: New nursery rule entries are consistent; one tiny style nit

The two new nursery entries line up with the dedicated rule pages and domains, and the “not released yet” moon icon is the right call.

If you want to match the prevailing style in this table, consider adding a trailing full stop to the useDestructuring description (“Require destructuring from arrays and/or objects.”).

src/content/docs/linter/rules/use-destructuring.mdx (1)

18-41: Clarify the “Sources” phrasing and consider a small punctuation tweak

The rule description and examples are clear and mirror the intent of ESLint’s prefer-destructuring nicely.

Two minor wording nits you might want to adjust in the generator:

  • “Sources: Same as [prefer-destructuring]” could be softened to “Inspired by” or “Based on” to avoid implying exact behavioural equivalence now and in future.
  • For consistency with other docs, you might add a full stop to the description sentence “Require destructuring from arrays and/or objects.”

Both are purely editorial; the technical content looks solid.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f57ce00 and 0cb94a3.

⛔ Files ignored due to path filters (3)
  • Cargo.lock is excluded by !**/*.lock
  • src/components/generated/linter/NumberOfRules.astro is excluded by !**/generated/**
  • src/playground/generated/lintRules.ts is excluded by !**/generated/**
📒 Files selected for processing (9)
  • Cargo.toml (1 hunks)
  • codegen/src/lintdoc.rs (4 hunks)
  • redirects.js (2 hunks)
  • src/content/docs/linter/domains.mdx (1 hunks)
  • src/content/docs/linter/javascript/rules.mdx (1 hunks)
  • src/content/docs/linter/json/rules.mdx (1 hunks)
  • src/content/docs/linter/rules/no-biome-first-exception.mdx (3 hunks)
  • src/content/docs/linter/rules/use-await-thenable.mdx (1 hunks)
  • src/content/docs/linter/rules/use-destructuring.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/linter/rules/use-await-thenable.mdx

[style] ~46-~46: For conciseness, consider replacing this expression with an adverb.
Context: ..._ used on Promise values. :::caution At the moment, this rule only checks for instances of...

(AT_THE_MOMENT)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (7)
src/content/docs/linter/json/rules.mdx (1)

29-29: Description now matches the broader rule semantics

The updated wording is clear, accurate, and aligned with the dedicated rule page. Nothing to change here.

src/content/docs/linter/domains.mdx (1)

101-101: Project-domain listing for useAwaitThenable looks consistent

The new entry is in the right domain, marked as nursery, and alphabetically slotted; it matches the dedicated rule docs.

redirects.js (1)

278-300: New redirects for camelCase rule URLs are correct

Both mappings (useAwaitThenable and useDestructuring) point to the expected kebab-case paths and fit neatly into the existing sorted list.

codegen/src/lintdoc.rs (3)

19-19: LGTM!

Necessary imports for the service object refactoring below.

Also applies to: 31-31


1656-1660: LGTM!

Correctly constructs JsonAnalyzeServices with configuration_source: None, appropriate for the codegen context where no custom configuration is being analysed.


1721-1723: LGTM!

The semantic model construction and CssAnalyzerServices builder pattern usage are correct, enabling richer CSS analysis.

Cargo.toml (1)

19-62: Verify git revision consistency and required API types.

The AI summary references revision e039f3b1... while the code shows d407efb8c650b9288f545efedd4b7d3f9783c8d1. Confirm which revision is correct and that it contains the CssAnalyzerServices and JsonAnalyzeServices types required by the changes in codegen/src/lintdoc.rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant