-
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
[No QA][TS migration] Adjust ESLint and TS configs #40778
[No QA][TS migration] Adjust ESLint and TS configs #40778
Conversation
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.
I'm curious, why did these generated files change?
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.
I have no idea what caused this, I only changed eslint and TS configs. Any idea? 😅
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.
I guess it's because of the .eslintrc.js
added?
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.
But let's make sure workflow tests are passing and watch for regressions 👀
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.
Left a few comments 👀
src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js
Outdated
Show resolved
Hide resolved
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
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.
High-level request: rather than making all these changes here in our .eslintrc.js
, can we update our base eslint-config-expensify to include all the rules (dynamically for JS and TS)?
@roryabraham While I agree that it would be nice to move the majority of rules to This won't be as easy as moving all the rules from E/App I'm worried that it would take too much time and won't bring much value.
|
I'm confused why it would be a big refactor in eslint-config-expensify, given that most/all the rules here are specific to either TS files or React Native. I'd think that would mean it would have minimal effect on our other repos unless they start using TS or RN. That said, if you investigated and feel strongly then it's NAB, because as I said I'd expect the effect on other repos to be very limited. |
There are conflicts and failing TS checks here, btw |
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.
overall this seems good
.eslintignore
Outdated
**/dist/* | ||
android/**/build/* | ||
.github/actions/**/index.js" | ||
.* |
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.
question: does this line ignore anything that starts with .
? If yes, great change! I was going to ask that we ignore .bundle
and .expo
too but it seems like that's covered.
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.
Yes! I thought it was clever but turns out here are two caveats:
- With this approach
.github
and.storybook
weren't linted (it's more complicated because we want to lint.github
but not.github/actions/**/index.js
) - Turns out dot files/directories are automatically omitted so no need for
.*
, instead I did this:
!.storybook
!.github
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.
@parasharrajat I checked it myself but could you double check that correct directories are linted (.github, .storybook, src, web, desktop etc) and correct are omitted (.github/actions/**/index.js, configs, dist, .expo, .git)? Thank you!
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.
Sure.
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.
It looks good to me.
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.
Some files are still showing errors via ts compiler though the EsLint is not triggered.
@roryabraham Left an explanation here |
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.
Looks good to me, the TS failures are expected for now
@roryabraham all yours
Conflict again @blazejkustra |
@parasharrajat I believe we don't have a rule for it 🤔 |
Aha, I see. |
You're correct, that most of these rules are indeed specific to TS and RN, but also specific to NewDot. These rules might impact other projects that have different coding styles (Onyx as an example). Such impact might go unnoticed unless thoroughly checked. This leads to the need to restructure and possibly add another preset to extends: [ 'expensify', ... We would have something like this instead: extends ['expensify-typescript', ... Breaking it down, this implies:
That's where the potential time consumption and complexity arises from. @roryabraham Let me your thoughts + please have a final look at the PR 😄 |
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 👍🏼
TypeCheck is failing because of the addition of a new .js
file, but it's a .eslintrc.js
, so not a concern. Going to merge.
@roryabraham looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
not an emergency - see last comment |
✋ 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/roryabraham in version: 1.4.74-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.4.74-6 🚀
|
Details
Fixed Issues
$ #39119
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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