Repository navigation
Replacement/improvement of func-name-matching eslint rule #57899
Copy link
Copy link
Closed as not planned
Labels
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
Description
Activity
- addedtoolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
on Apr 16, 2025 github-actions commented
on Apr 20, 2026 on Apr 20, 2026 – with GitHub Actions · Hidden as off-topicshow commentMore actions- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Apr 20, 2026 - removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on May 16, 2026 fwiw, i just found out that we can't really propose a change anymore with the
func-name-matchingrule on the eslint itself cause they made it a frozen rule- added a commit that references this issue
on Jul 14, 2026 - added 2 commits that reference this issue
on Jul 21, 2026 - added a commit that references this issue
on Jul 29, 2026 - added a commit that references this issue
on Aug 6, 2026 This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Sep 4, 2026 This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Metadata
Metadata
Assignees
Labels
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
There are quite a few places where a property is defined like this:
As result, we end up with quite a few functions named
value:There is a
func-name-matchingrule in eslint that enforces function names to match the property names. However, in these cases, this rule rejects correct code and insists that these functions must be namedvalue, to the point that in some places we have them explicitly named like this:node/lib/test/reporters.js
Line 56 in cb5f671
I think, it would be nice to have a custom linter rule that:
func-name-matchingeverywhere outside ofObjectDefineProperty,ObjectDefineProperties, andReflectDefinePropertyvalueI'm not familiar with eslint rules definitions but the original
func-name-matchingrule seems to be defined here: https://github.com/eslint/eslint/blob/e8f8d57bd6c0d95f9f25db8c5b3ff72de42488b7/lib/rules/func-name-matching.js.The rule already has
considerPropertyDescriptoroption, but it's not applicable here because:Object.defineProperty) but not primordials (ObjectDefineProperty)value: function() {) and concise notation (value() {)Object.create()