Skip to content
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

Enable no-nested-ternary lint rule #2011

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Enable no-nested-ternary lint rule #2011

merged 2 commits into from
Oct 17, 2024

Conversation

iamacook
Copy link
Member

Summary

Nested ternaries are hard to follow. As such, this enabled the no-nested-ternary lint rule and solves the only flouting occurance.

Changes

  • Enable no-nested-ternary lint tule.
  • Change nested ternary to use if clauses.

@iamacook iamacook self-assigned this Oct 14, 2024
@iamacook iamacook requested a review from a team as a code owner October 14, 2024 11:02
: twapParts
: [];
// Fetch no parts if transaction isn't executed, otherwise only those up to max
const partsToFetch = ((): Array<GPv2OrderParameters> => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can we write it without using a function?
Calling a function adds another layer to the execution context.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed in 12ff848.

@iamacook iamacook requested a review from PooyaRaki October 16, 2024 11:58
@iamacook iamacook merged commit 2d1f1d5 into main Oct 17, 2024
18 checks passed
@iamacook iamacook deleted the disable-nested-ternaries branch October 17, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants