App: [HOLD for payment 2023-05-05] [$1000] Enable `no-invalid-this` ESLint rule
Context: https://expensify.slack.com/archives/C049HHMV9SM/p1682089468352009
Problem
Using this outside of classes or class-like objects might work because it could refer to the module (for example, ReportUtils), but after building it, it might not be the case. This will cause crashes that cannot be caught while testing PRs and will only be seen once the app is deployed on staging or production.
Solution
Enable this ESLint rule (no-invalid-this) in our eslint-config-expensify repo.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0138e39a2b0f958b39
- Upwork Job ID: 1650895714648719360
- Last Price Increase: 2023-04-25
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 28 (15 by maintainers)
@s77rt paid! Thank you!
@NicMendonca Applied.
@Prince-Mendiratta youβve been paid, thank you!
What a friendly non time-consuming checklist π
PR enabling the rule is ready.
PR bumping the version on E/A is ready for review as well but awaiting merge on the aforementioned PR.
Applied in Upwork.
cc @tgolen @s77rt @NicMendonca
Assigning @Prince-Mendiratta since I think @tgolen forgot hehe
@alitoshmatov Thanks for the proposal. Given this is a feature request there is not much to base proposal selection on. So we are going with the first proposal that we get. I hope this makes sense and looks fair for all. The location of the rule is not a significant difference and I think es6 is just fine.
@Prince-Mendiratta Thanks for the proposal. Letβs get this going!
π π π C+ reviewed
cc @pecanoro