-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Standardize imports #6279
Standardize imports #6279
Conversation
Yep, had the same doubt, I leave it totally up to you. If I was working on it, I would add it because it is just one, but if we had many (hopefully won't happen) it could become a pain to maintain and I wouldn't do it. |
Moving the methods to a new I asked this question because I saw some cases where we are still destructuring imports from styles and I don't know if they were intentionally left like that, i.e.:
App/src/components/ThumbnailImage.js Line 7 in 0aa9834
|
Yeah maybe this is a bit confusing, but the new guidance is to only warn if we are not mixing default and named together in one import so those examples you shared are actually OK but something like this would not be OK... import {getAutoGrowTextInputStyle} from '../styles/styles'; |
It gets confusing when you are not mixing these together e.g. how should we fix that previous example? import * as StyleUtils from '../styles/styles'; Doesn't seem quite right if there's still a default export. Gonna take some time to fix these up since @jasperhuangg had a similar question and this will probably remain confusing. I think the long term mission is to stop mixing these together and just use one or the other. |
Ok, I think we are good now once e2e finishes 🤞 |
I see, thanks for explaining |
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 think your have to update the package-lock.json
"resolved": "https://registry.npmjs.org/eslint-config-expensify/-/eslint-config-expensify-2.0.18.tgz", | ||
"integrity": "sha512-jEBAcXWm89NptiprvlBrRoDsK8zJbbkt8yVZOgzo/Vadp86gL0oc7blgyLfJHA2cjecs1kgfPYGByXb6V8v8cw==", | ||
"version": "2.0.19", | ||
"resolved": "git+https://github.com/Expensify/eslint-config-expensify.git#afc71e84361cc68af4a85b425b3a599c4ac1861d", |
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 think this needs to be updated. If I try to do npm install
with the committed package-lock.json
, I get this error:
npm ERR! code 128
npm ERR! Command failed: git checkout afc71e84361cc68af4a85b425b3a599c4ac1861d
npm ERR! fatal: reference is not a tree: afc71e84361cc68af4a85b425b3a599c4ac1861d
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/aldocanepa/.npm/_logs/2021-11-24T18_57_59_383Z-debug.log
Deleting the package-lock.json
and running npm install
changes to:
"eslint-config-expensify": {
"version": "2.0.19",
"resolved": "git+https://github.com/Expensify/eslint-config-expensify.git#e1edb2cfe7fd91b9b131187cb19481ba9d29705b",
...
}
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.
Oh hmm weird..
@aldo-expensify let me know if that solved it for ya! |
It did 👍 |
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! feel free to merge once the e2e tests pass!
@marcaaron looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Tbh I don't know why the |
🚀 Deployed to staging by @marcaaron in version: 1.1.16-11 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.1.17-7 🚀
|
Details
Fixed Issues
$ #6072
Tests
QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android