Skip to content

Conversation

@ota-meshi
Copy link
Member

@ota-meshi ota-meshi commented Nov 11, 2025

This PR adds a new rule to disallow method from the ES2026 Iterator Sequencing proposal.

https://github.com/tc39/proposal-iterator-sequencing

@changeset-bot
Copy link

changeset-bot bot commented Nov 11, 2025

🦋 Changeset detected

Latest commit: 3905913

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-es-x Minor

Not sure what this means? Click here to learn what changesets are.

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

@ota-meshi ota-meshi marked this pull request as draft November 11, 2025 11:16
@ota-meshi ota-meshi marked this pull request as ready for review November 18, 2025 05:30
@ota-meshi ota-meshi requested a review from Copilot November 22, 2025 02:19
Copilot finished reviewing on behalf of ota-meshi November 22, 2025 02:22
Copy link

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 adds a new ESLint rule es-x/no-iterator-concat to disallow the Iterator.concat static method from the ES2026 Iterator Sequencing proposal. The implementation follows the established patterns in the codebase for static property rules, using the defineStaticPropertiesHandler helper and including the standard allowTestedProperty option.

  • Adds the new rule implementation with proper ES2026 categorization
  • Includes test coverage for basic valid and invalid cases
  • Integrates the rule into both legacy and flat ESLint configs
  • Provides comprehensive documentation with examples and options
  • Updates the well-known-properties.js to include concat in alphabetical order
  • Includes a minor regex improvement in the docs update script

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/rules/no-iterator-concat.js New rule implementation using defineStaticPropertiesHandler to detect Iterator.concat usage
tests/lib/rules/no-iterator-concat.js Basic test coverage for the new rule with valid and invalid cases
lib/index.js Exports the new rule in alphabetical order
lib/util/well-known-properties.js Adds concat to the iteratorProperties set in alphabetical order
lib/configs/no-new-in-esnext.js Enables the rule in the no-new-in-esnext config
lib/configs/flat/no-new-in-esnext.js Enables the rule in the flat config variant
docs/rules/no-iterator-concat.md Complete documentation with examples, options, and references
docs/rules/index.md Adds the rule to the ES2026 rules table
scripts/update-docs-rules.js Makes description line optional in regex pattern (allows empty descriptions)
.changeset/no-iterator-concat.md Changeset entry for minor version bump

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

@ota-meshi ota-meshi merged commit e48f044 into master Nov 22, 2025
16 checks passed
@ota-meshi ota-meshi deleted the no-iterator-concat branch November 22, 2025 02:40
@github-actions github-actions bot mentioned this pull request Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants