node icon indicating copy to clipboard operation
node copied to clipboard

[WIP] lib: rename functions named `value`

Open LiviaMedeiros opened this issue 8 months ago • 3 comments

Refs: https://github.com/nodejs/node/issues/57899 This requires adjusting linter rules. Or slapping // eslint-disable-line func-name-matching and regression tests as temporal solution.

If anyone is willing to make this into linter rule, feel free to takeover this.

LiviaMedeiros avatar Apr 16 '25 19:04 LiviaMedeiros

Review requested:

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

nodejs-github-bot avatar Apr 16 '25 19:04 nodejs-github-bot

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.

ljharb avatar Apr 16 '25 20:04 ljharb

Codecov Report

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

Files with missing lines Patch % Lines
lib/internal/per_context/domexception.js 0.00% 1 Missing :warning:
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%) :arrow_up:
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%) :arrow_up:
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%) :arrow_up:
lib/internal/per_context/domexception.js 82.43% <0.00%> (ø)

... and 42 files with indirect coverage changes

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

codecov[bot] avatar Apr 16 '25 20:04 codecov[bot]

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.

louiellan avatar Jul 24 '25 05:07 louiellan

@louiellan sorry for the late response. Yes, the code in your branch LGTM! Small adjustments:

  • the test's filename should start with test-, i.e. func-name-matching.test.js should be renamed to something like test-eslint-func-name-matching.js.
  • i think the @author comments should be in separate lines (with multiple @author tags) rather than comma-separated.

Please feel free to open a PR either against this branch, or directly against main branch (not preserving my commit is also okay). Or i can merge your commits into this PR once am on PC (probably mid-August). Thank you!

LiviaMedeiros avatar Jul 30 '25 14:07 LiviaMedeiros

@LiviaMedeiros I've made the adjustments and here's the pull request to your branch, https://github.com/LiviaMedeiros/node/pull/1

louiellan avatar Jul 31 '25 04:07 louiellan

CI: https://ci.nodejs.org/job/node-test-pull-request/68342/

nodejs-github-bot avatar Aug 01 '25 09:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/68346/

nodejs-github-bot avatar Aug 01 '25 09:08 nodejs-github-bot