Skip to content

Conversation

@stepankuzmin
Copy link

Adds a new ESLint rule no-object-methods-on-collections that prevents using Object methods on Map, Set, WeakMap, and WeakSet instances.

Based on #10104 and #9369

Examples

❌ Incorrect

const map = new Map();
Object.keys(map); // Returns empty array

✅ Correct

const map = new Map();
Array.from(map.keys()); // Correct way to get keys

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @stepankuzmin!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify
Copy link

netlify bot commented Oct 24, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit bedf3dc
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/68fb9554fdc4a200084164a6
😎 Deploy Preview https://deploy-preview-11718--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96
Accessibility: 97
Best Practices: 100
SEO: 92
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link

nx-cloud bot commented Oct 24, 2025

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit bedf3dc

Command Status Duration Result
nx test eslint-plugin --coverage=false ❌ Failed 5m 18s View ↗
nx run-many -t lint ❌ Failed 3m 14s View ↗
nx run integration-tests:test ❌ Failed 56s View ↗
nx test eslint-plugin ❌ Failed 5m 11s View ↗
nx run-many -t typecheck ✅ Succeeded 2m 3s View ↗
nx run types:build ✅ Succeeded 5s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 4s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 2s View ↗
Additional runs (28) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-10-24 15:12:30 UTC

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.

1 participant