Skip to content

Conversation

LiviaMedeiros
Copy link
Member

@LiviaMedeiros LiviaMedeiros commented Apr 16, 2025

Refs: #57899

This PR adds a node-core/func-name-matching linter rule that correctly handles defining properties with functions as value, and fixes the function names accordingly.

Authored by @louiellan

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup
  • @nodejs/streams
  • @nodejs/test_runner
  • @nodejs/web-standards

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 16, 2025
@LiviaMedeiros LiviaMedeiros added help wanted Issues that need assistance from volunteers or PRs that need help to proceed. wip Issues and PRs that are still a work in progress. labels Apr 16, 2025
@ljharb
Copy link
Member

ljharb commented Apr 16, 2025

it'd be great to get a PR that just fixes the value-named functions and disables the lint rule so that it can be released and maximally backported.

Copy link

codecov bot commented Apr 16, 2025

Codecov Report

❌ Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.96%. Comparing base (5d3efaa) to head (fb84904).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/per_context/domexception.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57901      +/-   ##
==========================================
- Coverage   89.97%   89.96%   -0.01%     
==========================================
  Files         649      649              
  Lines      192202   192198       -4     
  Branches    37689    37671      -18     
==========================================
- Hits       172932   172913      -19     
- Misses      11869    11877       +8     
- Partials     7401     7408       +7     
Files with missing lines Coverage Δ
lib/fs.js 98.18% <100.00%> (ø)
...internal/bootstrap/web/exposed-window-or-worker.js 93.79% <100.00%> (ø)
lib/internal/console/constructor.js 98.98% <100.00%> (+<0.01%) ⬆️
lib/internal/modules/esm/hooks.js 90.68% <100.00%> (ø)
lib/internal/modules/esm/translators.js 92.45% <100.00%> (ø)
lib/internal/streams/writable.js 96.64% <100.00%> (+<0.01%) ⬆️
lib/internal/util/types.js 100.00% <100.00%> (ø)
lib/internal/worker/io.js 99.19% <100.00%> (ø)
lib/zlib.js 98.26% <100.00%> (+<0.01%) ⬆️
lib/internal/per_context/domexception.js 82.43% <0.00%> (ø)

... and 42 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@louiellan
Copy link

Hello, I've worked on the eslint rule for this one, i've just made some changes with the eslint's func-name-matching rule, and its ruletester.

You can check the work here: lib-name-functions

Let me know if you guys have any thoughts on this :>, and if all is good, i could send a PR to this PR's branch.

@LiviaMedeiros
Copy link
Member Author

LiviaMedeiros commented Jul 30, 2025 via email

@louiellan
Copy link

@LiviaMedeiros I've made the adjustments and here's the pull request to your branch, LiviaMedeiros#1

@LiviaMedeiros LiviaMedeiros added tools Issues and PRs related to the tools directory. and removed help wanted Issues that need assistance from volunteers or PRs that need help to proceed. wip Issues and PRs that are still a work in progress. labels Jul 31, 2025
@LiviaMedeiros LiviaMedeiros changed the title [WIP] lib: rename functions named value lib,tools: rename functions named value Jul 31, 2025
@nodejs-github-bot

This comment was marked as outdated.

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants