Skip to content

docs(linter): Update docs for no-optional-chaining rule to clarify its safety today#16727

Merged
graphite-app[bot] merged 1 commit intomainfrom
opt-chain-docs
Dec 11, 2025
Merged

docs(linter): Update docs for no-optional-chaining rule to clarify its safety today#16727
graphite-app[bot] merged 1 commit intomainfrom
opt-chain-docs

Conversation

@connorshea
Copy link
Copy Markdown
Member

The rule is safe to use nowadays, as all major browsers have supported it for over 5 years.

@connorshea connorshea requested a review from camc314 as a code owner December 11, 2025 04:38
Copilot AI review requested due to automatic review settings December 11, 2025 04:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the documentation for the oxc/no-optional-chaining linter rule to reflect the current state of browser support for optional chaining. The update clarifies that optional chaining is now widely supported and safe to use in most modern codebases, while still acknowledging valid use cases for the rule when supporting older environments.

  • Updates the reference link from TC39 proposal to MDN documentation
  • Rewrites the "Why is this bad?" section to emphasize that optional chaining has been supported since 2020 and is generally safe to use today
  • Provides clearer guidance that most codebases should not use this restriction rule unless they need to support pre-2020 browsers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation labels Dec 11, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 11, 2025

CodSpeed Performance Report

Merging #16727 will not alter performance

Comparing opt-chain-docs (a816c17) with main (afd6c44)1

Summary

✅ 4 untouched
⏩ 41 skipped2

Footnotes

  1. No successful run was found on main (6079d8e) during the generation of this report, so afd6c44 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
@camc314 camc314 self-assigned this Dec 11, 2025
Copy link
Copy Markdown
Contributor

camc314 commented Dec 11, 2025

Merge activity

…s safety today (#16727)

The rule is safe to use nowadays, as all major browsers have supported it for over 5 years.
@graphite-app graphite-app bot merged commit 2195150 into main Dec 11, 2025
20 checks passed
@graphite-app graphite-app bot deleted the opt-chain-docs branch December 11, 2025 09:22
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants