Repository navigation
[HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] [TS Migration] Standartize between Boolean or !! #39126
Description
Activity
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}`); } }); } } }; } };- changed the title
[-][TS Migration] Standartize between Boolean or !![/-][+][HOLD TS migration completion] [TS Migration] Standartize between Boolean or !![/+]on Mar 28, 2024 10 days overdue. Is anyone even seeing these? Hello?
@mountiny Can we pick this since TS migration is almost done? I've sent a proposal above.
@ShridharGoel Not yet, let's wait until migration is fully finished
Reacted by Fábio Henriques12 days overdue. Walking. Toward. The. Light...
This is on hold Melvin..
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
115 remaining items
@ishpaul777 can you confirm if this needs a regression test please before EOD to help avoid a delay in payment? Thank you!
Bump @ishpaul777 ^^^
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.
Reacted by Cortney Ofstad@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!
not overdue, @ShridharGoel gentle bump on ^, so we can close this
@CortneyOfstad, @ShridharGoel, @aldo-expensify, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@ShridharGoel let me know once you accept and I can get this paid ASAP. Thanks!
Accepted, thanks.
Payment Summary
@ishpaul777 — paid $250 via Upwork
@ShridharGoel — paid $250 via Upwork
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Follow up issue for TS migration project. Coming from this spreadsheet
Lets pick the one which can be enforced with eslint
Any more details for this one cc @blazejkustra @fabioh8010
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @CortneyOfstad