Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

feat: add no-nested-ternary to eslint rules #679

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

rvermootenct
Copy link
Contributor

Scope

A developer girl shouldn't have to hurt her brain to understand the logic flow in the application. Adding in warnings that nested-ternaries are not acceptable is a step in that direction.

More context

The app is littered in deeply nested ternaries, which by their nature is super hard to reason about and read. Considering this is a sample app, a lot of people are going to be reading the code.

Work Done

Added 'no-nested-ternary': 'error' to the eslint rules. Ideally this would be an error, but would create a lot of code needing to be updated before this could go in.

Steps to test

Add a nested ternary. Eslint should give you a warning.

GIF tax

@vercel
Copy link

vercel bot commented Sep 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
100ms-web ❌ Failed (Inspect) Sep 20, 2023 11:45am
100ms-web-2-for-wiki ❌ Failed (Inspect) Sep 20, 2023 11:45am

@vercel
Copy link

vercel bot commented Sep 20, 2023

@rvermootenct is attempting to deploy a commit to the 100mslive Team on Vercel.

A member of the Team first needs to authorize it.

@raviteja83 raviteja83 merged commit eaa185b into 100mslive:main Sep 21, 2023
3 checks passed
@rvermootenct rvermootenct deleted the patch-1 branch September 21, 2023 15:26
@ygit
Copy link
Member

ygit commented Sep 22, 2023

@rvermootenct Thanks for contributing 🙌

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants