Skip to content

feat(biome_js_analyse): added new option to rule to ignore unused function parameters #6405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

vladimir-ivanov
Copy link
Contributor

Summary

Added ignoreRestSiblings option to noUnusedFunctionParameters rule to ignore unused function parameters that are siblings of the rest parameter.
Default is false, which means that unused function parameters that are siblings of the rest parameter will be reported.

Example

{
  "rules": {
    "noUnusedFunctionParameters": ["error", { "ignoreRestSiblings": true }]
  }
}

closes #5941

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Jun 19, 2025
Copy link

codspeed-hq bot commented Jun 19, 2025

CodSpeed Performance Report

Merging #6405 will not alter performance

Comparing vladimir-ivanov:feat/noUnusedFunctionParameter-add-ignoreRestSiblingss-option (92011a4) with main (ef2421d)

Summary

✅ 114 untouched benchmarks

@vladimir-ivanov vladimir-ivanov force-pushed the feat/noUnusedFunctionParameter-add-ignoreRestSiblingss-option branch 3 times, most recently from 3f78723 to 1f60fe3 Compare June 19, 2025 11:08
@vladimir-ivanov
Copy link
Contributor Author

review please :-)

@ematipico ematipico added the S-Feature Status: new feature to implement label Jun 22, 2025
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking to avoid accidental merges, since it's a minor

Copy link

changeset-bot bot commented Jun 22, 2025

🦋 Changeset detected

Latest commit: 92011a4

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

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/wasm-web Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/backend-jsonrpc Patch
@biomejs/js-api Major

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

@arendjr arendjr added this to the Biome 2.1 milestone Jun 23, 2025
@vladimir-ivanov
Copy link
Contributor Author

are we merging this anytime soon please? @ematipico

@arendjr
Copy link
Contributor

arendjr commented Jun 27, 2025

@vladimir-ivanov Since it's targeting the next minor, we can't merge to main yet, since we may still create patch releases from there. If you're eager to see it merged you can also rebase on top of next, where we can merge it anytime.

In the #maintainers channel on Discord there was also a discussion around branching strategy the other day, with ideas that might allow us to open up main sooner, although we could use some help on updating the docs and maybe CI if we were to make that change. Feel free to chip in if you're interested in that ;)

@vladimir-ivanov
Copy link
Contributor Author

@vladimir-ivanov Since it's targeting the next minor, we can't merge to main yet, since we may still create patch releases from there. If you're eager to see it merged you can also rebase on top of next, where we can merge it anytime.

In the #maintainers channel on Discord there was also a discussion around branching strategy the other day, with ideas that might allow us to open up main sooner, although we could use some help on updating the docs and maybe CI if we were to make that change. Feel free to chip in if you're interested in that ;)

leaving to someone else to merge once it is allowed to go in then, thank you :-)

@dyc3 dyc3 changed the title feat(biome-js-analyse): added new option to rule to ignore unused f… feat(biome-js-analyse): added new option to rule to ignore unused function parameters Jun 27, 2025
@dyc3 dyc3 changed the title feat(biome-js-analyse): added new option to rule to ignore unused function parameters feat(biome_js_analyse): added new option to rule to ignore unused function parameters Jun 27, 2025
@vladimir-ivanov vladimir-ivanov force-pushed the feat/noUnusedFunctionParameter-add-ignoreRestSiblingss-option branch from d3d70b3 to 92011a4 Compare July 1, 2025 20:03
@vladimir-ivanov vladimir-ivanov requested a review from ematipico July 1, 2025 20:05
@vladimir-ivanov
Copy link
Contributor Author

@ematipico @dyc3 is this good to go now please?

Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under the contribution guide changes in #6664, this would need to go onto next instead of main, but we don't have that set up yet. This can move forward when that is resolved.

@ematipico
Copy link
Member

It can go to main, because we already have minor changes. Good to go!

@vladimir-ivanov vladimir-ivanov merged commit cd4a9bb into biomejs:main Jul 3, 2025
29 checks passed
@github-actions github-actions bot mentioned this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Feature Status: new feature to implement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💅 Function parameters with spread operator are not correctly checked by noUnusedFunctionParameters
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy