Skip to content

[HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] [TS Migration] Standartize between Boolean or !! #39126

Description

@mountiny

Follow up issue for TS migration project. Coming from this spreadsheet

Standartize between Boolean or !!

Lets pick the one which can be enforced with eslint

Any more details for this one cc @blazejkustra @fabioh8010

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01111a2979f5f2ac8c
  • Upwork Job ID: 1780333266166345728
  • Last Price Increase: 2024-04-16
  • Automatic offers:
    • ishpaul777 | Contributor | 0
    • ShridharGoel | Contributor | 0
Issue OwnerCurrent Issue Owner: @CortneyOfstad

Activity

  1. ShridharGoel commented on Mar 28, 2024

    @ShridharGoel
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Standardise between Boolean or !!.

    What is the root cause of that problem?

    New check using ESlint.

    What changes do you think we should make in order to solve the problem?

    Slack discussion: https://expensify.enterprise.slack.com/archives/C01GTK53T8Q/p1713329747825759. Looks like we want to go ahead with !!, so the check can look like this:

    module.exports = {
        create: function(context) {
            return {
                CallExpression: function(node) {
                    if (node.callee.type === "Identifier" && node.callee.name === "Boolean" && node.arguments.length === 1) {
                        context.report({
                            node: node,
                            message: "Use !! instead of Boolean",
                            fix: function(fixer) {
                                const sourceCode = context.getSourceCode();
                                const argumentText = sourceCode.getText(node.arguments[0]);
                                return fixer.replaceText(node, `!!${argumentText}`);
                            }
                        });
                    }
                }
            };
        }
    };
    
  2. changed the title [-][TS Migration] Standartize between Boolean or !![/-] [+][HOLD TS migration completion] [TS Migration] Standartize between Boolean or !![/+] on Mar 28, 2024
  3. melvin-bot commented on Apr 8, 2024

    @melvin-bot

    10 days overdue. Is anyone even seeing these? Hello?

  4. ShridharGoel commented on Apr 8, 2024

    @ShridharGoel
    Contributor

    @mountiny Can we pick this since TS migration is almost done? I've sent a proposal above.

  5. blazejkustra commented on Apr 9, 2024

    @blazejkustra
    Contributor

    @ShridharGoel Not yet, let's wait until migration is fully finished

  6. melvin-bot commented on Apr 10, 2024

    @melvin-bot

    12 days overdue. Walking. Toward. The. Light...

  7. fabioh8010 commented on Apr 11, 2024

    @fabioh8010
    Contributor

    This is on hold Melvin..

  8. blazejkustra commented on Apr 15, 2024

    @blazejkustra
    Contributor

    Details:

    We want to standardize with just one approach, !! and Boolean() are almost identical and we want to ensure just one is used in the codebase to avoid cases like this 😅

    offline = Boolean(network.shouldForceOffline) || !!network.isOffline;

    This includes writing a proposal on Slack, adjusting the code in the repository and perhaps adding an eslint rule that ensures only one approach is used. I myself believe !! is more readable more concise and faster in runtime.

    This issue requires a minimal understanding of how Expensify process works, before coding the contributor have to post a Problem/Solution on open-source channel

  9. 115 remaining items

  10. CortneyOfstad commented on Jun 19, 2024

    @CortneyOfstad
    Contributor

    @ishpaul777 can you confirm if this needs a regression test please before EOD to help avoid a delay in payment? Thank you!

  11. CortneyOfstad commented on Jun 20, 2024

    @CortneyOfstad
    Contributor

    Bump @ishpaul777 ^^^

  12. ishpaul777 commented on Jun 20, 2024

    @ishpaul777
    Contributor

    Sorry i missed the ping. We dont need a regression test, this issue was not about adding a new functionality but to standardize on a code pattern.

  13. CortneyOfstad commented on Jun 20, 2024

    @CortneyOfstad
    Contributor

    @ShridharGoel I had to reinvite you to the job post because for some reason you were not listed in Upwork — let me know once you accept and I can get that paid ASAP!

  14. ishpaul777 commented on Jun 24, 2024

    @ishpaul777
    Contributor

    not overdue, @ShridharGoel gentle bump on ^, so we can close this

  15. melvin-bot commented on Jun 24, 2024

    @melvin-bot

    @CortneyOfstad, @ShridharGoel, @aldo-expensify, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  16. CortneyOfstad commented on Jun 24, 2024

    @CortneyOfstad
    Contributor

    @ShridharGoel let me know once you accept and I can get this paid ASAP. Thanks!

  17. ShridharGoel commented on Jun 25, 2024

    @ShridharGoel
    Contributor

    Accepted, thanks.

  18. CortneyOfstad commented on Jun 25, 2024

    @CortneyOfstad
    Contributor

    Payment Summary

    @ishpaul777 — paid $250 via Upwork
    @ShridharGoel — paid $250 via Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.TaskTypescript Migration

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions