lint: fix inconsistent callback function parameter names (#730)

* Fix linting

* Use is.ElementsMatch

This will ignore the ordering of the final intersection. Especially
important when checking old versions of go that do not guarantee an order
when iterating through maps.

* lint: fix inconsistent callback function parameter names

* lint: rename "iteratee" to "transform" for *Map helpers

* lint: rename "project" parameters to "transform"

* lint: rename "cb" parameters to "callback"

* lint: rename "iteratee" to "callback" for ForEach helpers

---------

Co-authored-by: Franky W. <frankywahl@users.noreply.github.com>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
This commit is contained in:
Nathan Baulch
2025-11-07 04:05:11 +11:00
committed by GitHub
parent 48d8fe40e5
commit e7386d9246
30 changed files with 178 additions and 178 deletions
@@ -16,7 +16,7 @@ export default function HelperCard({
// Extract function name from signature for godoc link
const functionName = useMemo(() => {
if (!helper.signatures) return '';
// Extract function name from signature like "func Map[T any, R any](collection []T, iteratee func(T, int) R) []R"
// Extract function name from signature like "func Map[T any, R any](collection []T, transform func(T, int) R) []R"
const match = helper.signatures.find(signature => signature.match(/func\s+(\w+)/))?.match(/func\s+(\w+)/);
return match ? match[1] : '';
}, [helper.signatures]);