| #
8a424beb |
| 11-Aug-2023 |
James Ide <[email protected]> |
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)
Why
---
Prettier 3 is out. Add support for it with this linter config.
**Note for reviewer:** the first commit is the one with th
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)
Why
---
Prettier 3 is out. Add support for it with this linter config.
**Note for reviewer:** the first commit is the one with the actual
changes. The rest of this PR are changes to get the linter passing
(mostly autofix).
How
---
Update eslint-config-prettier and eslint-plugin-prettier. To address
deprecation warnings, also update typescript-eslint/parser and
typescript-eslint/eslint-plugin.
Because of an update to typescript-eslint/parser, we need to suppress
deprecation warnings (documented in a comment).
Regenerated test snapshots. Due to the upgraded dependencies, typecasts
and optional chaining are now auto-fixable by lint. This converts
warnings into autofixes.
Test Plan
---
`yarn test` in the linter config. Run `expotools check --all --fix-lint
--no-build --no-test --no-uniformity-check` to try this config on the
whole repo.
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
d8009c4b |
| 24-Feb-2023 |
Evan Bacon <[email protected]> |
feat(cli): add support for path aliases and absolute imports (#21262)
# Why
- In Expo Router, you have to import outside of the `app` directory
which does not spark joy at scale (e.g. `../../../
feat(cli): add support for path aliases and absolute imports (#21262)
# Why
- In Expo Router, you have to import outside of the `app` directory
which does not spark joy at scale (e.g. `../../../../../../`).
- This is pretty standard functionality in web development, feels odd
not having it in our "Metro for web" system.
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
- Add support for `compilerOptions.baseUrl` from `tsconfig.json` and
`jsconfig.json` files to Metro. This enables absolute imports.
- Add support for `compilerOptions.paths` aliases from `tsconfig.json`
and `jsconfig.json` files to Metro. This enables path aliases. Tried to
keep the implementation as close to TypeScript as possible to reduce
maintenance.
- Absolute imports utilize built-in Metro behavior making it more
reliable. We basically just register the baseUrl as a location to search
for node modules.
- Couldn't decide where to document the feature so I put it in multiple
places.
- We might need to update expo jest to have similar functionality in the
future (it might already support these fields, didn't check).
<!--
How did you build this feature or fix this bug and why?
-->
# Test Plan
- Added some unit tests for path aliases (non-exhaustive).
- For correctness, you can use this feature in vscode and all
autocomplete suggestions should work as the bundling now matches the
built-in resolution.
<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
dc51e206 |
| 27-Apr-2022 |
Evan Bacon <[email protected]> |
feat(cli): add `export` command (#17034)
* feat(cli): add export command
* Update CHANGELOG.md
* update tests
* Update packages/@expo/cli/CHANGELOG.md
Co-authored-by: Expo Bot <34669131+
feat(cli): add `export` command (#17034)
* feat(cli): add export command
* Update CHANGELOG.md
* update tests
* Update packages/@expo/cli/CHANGELOG.md
Co-authored-by: Expo Bot <[email protected]>
* reduce interface
* refactor
refactor
refactor
* refactor
* remove all merging code
* drop aliases
* Added asset saving tests
* refactor export code up
* Update env.ts
* Drop unused
* added e2e tests
* Dropped --quiet flag
* PR Feedback
* fix tests
* fix export tests
* Update export-test.ts
Co-authored-by: Expo Bot <[email protected]>
show more ...
|