You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/26 02:11:48 UTC

[GitHub] [superset] etr2460 commented on a change in pull request #13221: refactor(explore): convert ControlPanelsContainer to typescript

etr2460 commented on a change in pull request #13221:
URL: https://github.com/apache/superset/pull/13221#discussion_r583311405



##########
File path: superset-frontend/.eslintrc.js
##########
@@ -226,6 +227,7 @@ module.exports = {
     'no-mixed-operators': 0,
     'no-multi-assign': 0,
     'no-multi-spaces': 0,
+    'no-nested-ternary': 0,

Review comment:
       Yeah, I'm a fan of nested ternaries when used sparingly. however, couldn't this be simplified to:
   ```typescript
           const controlName =
             typeof item === 'string'
               ? item
               : (item || {})?.name ?? null;
   ```
   
   or something like that?

##########
File path: superset-frontend/.eslintrc.js
##########
@@ -226,6 +227,7 @@ module.exports = {
     'no-mixed-operators': 0,
     'no-multi-assign': 0,
     'no-multi-spaces': 0,
+    'no-nested-ternary': 0,

Review comment:
       Not sure if that's really cleaner, but it doesn't use a nested ternary




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org