Skip to content

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Mar 5, 2024

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: infra Changes to our infrastructure or project setup labels Mar 5, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Mar 5, 2024
@ST-DDT ST-DDT requested review from a team March 5, 2024 18:21
@ST-DDT ST-DDT self-assigned this Mar 5, 2024
@ST-DDT
Copy link
Member Author

ST-DDT commented Mar 5, 2024

This should hopefully prevent issues such as #2563 in the future.

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.57%. Comparing base (a536a9d) to head (e6007f2).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2722      +/-   ##
==========================================
- Coverage   99.57%   99.57%   -0.01%     
==========================================
  Files        2859     2859              
  Lines      248602   248602              
  Branches      630      989     +359     
==========================================
- Hits       247557   247538      -19     
- Misses       1016     1035      +19     
  Partials       29       29              

see 1 file with indirect coverage changes

Shinigami92
Shinigami92 previously approved these changes Mar 5, 2024
@ST-DDT ST-DDT requested a review from a team March 5, 2024 19:25
Shinigami92
Shinigami92 previously approved these changes Mar 6, 2024
@ST-DDT ST-DDT force-pushed the infra/unicorn/no-array-callback-reference branch from 954f45f to c2e817d Compare March 9, 2024 18:59
@ST-DDT
Copy link
Member Author

ST-DDT commented Mar 9, 2024

I agree with the comments from @xDivisionByZerox and @matthewmayer here.
Enabling this rule harms code readability/adds unnecessary boilerplate to it.
I also considered adding an option to it, allowing for single argument parameters, but methods can be re-assigned without optional parameters without actually stripping them, so this would break the intention of the rule:

const fn: (arg1): T = (arg1, arg2?): T => { ...}
// fn still takes the second argument, although sneakily
return array.map(fn);
// would not show an error because the method type only takes a single argument

For this reason, this PR disables the rule permanently.

@ST-DDT ST-DDT requested review from matthewmayer, Shinigami92 and a team March 9, 2024 19:08
@ST-DDT ST-DDT enabled auto-merge (squash) March 10, 2024 08:45
@ST-DDT ST-DDT merged commit 89e3f1c into next Mar 10, 2024
@ST-DDT ST-DDT deleted the infra/unicorn/no-array-callback-reference branch March 10, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants