Skip to content

fix: preserve __proto__ in ConfigCommentParser results - #501

Merged
fasttime merged 1 commit into
eslint:mainfrom
sethamus:config-comment-parser-proto
Aug 28, 2026
Merged

fasttime merged 1 commit into
eslint:mainfrom
sethamus:config-comment-parser-proto

Conversation

@sethamus

Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

This PR fixes parseStringConfig() and parseListConfig() silently dropping an item named __proto__.

In ESLint this makes /* global __proto__ */ and /* exported __proto__ */ no-ops.

What changes did you make? (Give an overview)

  • parseStringConfig() and parseListConfig() now accumulate into Object.create(null) instead of {}, so __proto__ is stored as an ordinary own property.

Related Issues

eslint/eslint#21250

Is there anything you'd like reviewers to focus on?

@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Aug 25, 2026
@eslint-github-bot eslint-github-bot Bot added the bug Something isn't working label Aug 25, 2026

@mdjermanovic mdjermanovic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks! Leaving it open for a second review.

@mdjermanovic mdjermanovic moved this from Needs Triage to Second Review Needed in Triage Aug 26, 2026
@fasttime

Copy link
Copy Markdown
Member

I'm going to close and reopen this PR to trigger CI.

@fasttime fasttime closed this Aug 28, 2026
@github-project-automation github-project-automation Bot moved this from Second Review Needed to Complete in Triage Aug 28, 2026
@fasttime fasttime reopened this Aug 28, 2026
@github-project-automation github-project-automation Bot moved this from Complete to Evaluating in Triage Aug 28, 2026

@fasttime fasttime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@fasttime
fasttime merged commit 18773d9 into eslint:main Aug 28, 2026
64 of 70 checks passed
@github-project-automation github-project-automation Bot moved this from Evaluating to Complete in Triage Aug 28, 2026
@eslintbot eslintbot mentioned this pull request Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted bug Something isn't working contributor pool

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

4 participants