Skip to content

fix(linter): make react/forbid-component-props lists optional#23735

Open
camc314 wants to merge 1 commit into
mainfrom
codex/react-forbid-component-props-lists
Open

fix(linter): make react/forbid-component-props lists optional#23735
camc314 wants to merge 1 commit into
mainfrom
codex/react-forbid-component-props-lists

Conversation

@camc314

@camc314 camc314 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Marks the react/forbid-component-props allow/disallow selector lists as defaulted schema fields, so the generated config types treat them as optional and match the rule’s deserialization behavior.

Fixes #23732

@camc314 camc314 self-assigned this Jun 23, 2026
@github-actions github-actions Bot added A-linter Area - Linter A-cli Area - CLI labels Jun 23, 2026
@camc314
camc314 marked this pull request as ready for review June 23, 2026 09:02
Copilot AI review requested due to automatic review settings June 23, 2026 09:02

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e5797975d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread npm/oxlint/configuration_schema.json Outdated
"properties": {
"allowedFor": {
"description": "Component names for which this prop is **allowed** (all others are\nforbidden).",
"default": [],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the matcher requirement in the schema

With the selector lists now defaulted, ForbidItemObject has no required keys left in the generated schema, so configs like { "forbid": [{}] } or { "forbid": [{ "allowedFor": ["Foo"] }] } validate/type-check even though ForbidItemObject::deserialize still rejects them because exactly one of propName or propNamePattern is required. Please add an explicit schema/type constraint for that discriminator so editor/schema validation matches the runtime behavior.

Useful? React with 👍 / 👎.

@codspeed-hq

codspeed-hq Bot commented Jun 23, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 5 untouched benchmarks
⏩ 66 skipped benchmarks1


Comparing codex/react-forbid-component-props-lists (23a1d57) with main (1c8f50c)

Open in CodSpeed

Footnotes

  1. 66 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 force-pushed the codex/react-forbid-component-props-lists branch from 2e57979 to 23a1d57 Compare June 23, 2026 09:14
@Sysix

Sysix commented Jun 24, 2026

Copy link
Copy Markdown
Member

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

Labels

A-cli Area - CLI A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ForbidItemObject type broken

3 participants