-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NoQA] [Lint] Enable no-invalid-this
eslint rule
#18032
[NoQA] [Lint] Enable no-invalid-this
eslint rule
#18032
Conversation
Merged! 🎉 |
@@ -76,7 +76,7 @@ function translateLocal(phrase, variables) { | |||
* @return {String} | |||
*/ | |||
function arrayToString(anArray) { | |||
const and = this.translateLocal('common.and'); | |||
const and = translateLocal('common.and'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Catching problems already 🎉
Force pushed to re run GH actions |
Can you run |
Signed-off-by: Prince Mendiratta <prince.mendi@gmail.com>
Signed-off-by: Prince Mendiratta <prince.mendi@gmail.com>
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
@s77rt weirdly enough, this brought up a new unrelated lint error after the version bump:
|
@Prince-Mendiratta It's from Expensify/eslint-config-expensify@5b216cc Let's fix the lint rule |
It's weird that we didn't upgrade |
Agreed, maybe we can create a GH action to automatically create a new PR on E/App bumping the config version after a new npm package is released? If this is something we want to see, I can create a thread on #expensify-open-source to discuss the issue and possible resolutions, what say? |
Signed-off-by: Prince Mendiratta <prince.mendi@gmail.com>
That would be great. I'm sure I seen this brought up before. Can you fix the unsigned commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
cc @tgolen
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/tgolen in version: 1.3.7-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.7-3 🚀
|
Details
With this PR, we are enabling the use of the
no-invalid-this
eslint rule. Related slack thread and context: https://expensify.slack.com/archives/C049HHMV9SM/p1682089468352009Related PR: Expensify/eslint-config-expensify#67
Fixed Issues
$ #17971
PROPOSAL: #17971 (comment)
Tests
npm install
.npx eslint --print-config files.json > config.json
.no-invalid-this
is'error'
.Additionally, you can also undo the changes made in the
index.js
file the run thenpm run lint
command to ensure that any issues are reported.Offline tests
N/A
QA Steps
N/A. This is for dev.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
N/A.