| #
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 ...
|
| #
29128565 |
| 27-Jul-2022 |
Evan Bacon <[email protected]> |
feat(cli): disable prompts in non interactive processes (#18300)
* feat(cli): disable prompts in non interactive processes
* Update packages/@expo/cli/CHANGELOG.md
Co-authored-by: Expo Bot <34
feat(cli): disable prompts in non interactive processes (#18300)
* feat(cli): disable prompts in non interactive processes
* Update packages/@expo/cli/CHANGELOG.md
Co-authored-by: Expo Bot <[email protected]>
* Update startAsync.ts
* fix tests
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
814b6faf |
| 15-Apr-2022 |
Evan Bacon <[email protected]> |
chore(cli): lazy load all env vars (#17082)
* chore(cli): lazy load all env vars
lazily loading all environment variables makes it easier to test different cases since you can change the value of
chore(cli): lazy load all env vars (#17082)
* chore(cli): lazy load all env vars
lazily loading all environment variables makes it easier to test different cases since you can change the value of things like `CI` between tests.
* Update packages/@expo/cli/CHANGELOG.md
Co-authored-by: Expo Bot <[email protected]>
Co-authored-by: Expo Bot <[email protected]>
show more ...
|
| #
98ecfc87 |
| 24-Mar-2022 |
James Ide <[email protected]> |
[lint] Add "caughtErrors: 'all'" to linter config (#16591)
Why
---
ES2019 added "optional catch bindings" so that `e`/`error`/etc. don't need to be specified in catch clauses if the thrown value i
[lint] Add "caughtErrors: 'all'" to linter config (#16591)
Why
---
ES2019 added "optional catch bindings" so that `e`/`error`/etc. don't need to be specified in catch clauses if the thrown value isn't used. This changes our lint rules to warn if unnecessary error variables are declared. https://2ality.com/2017/08/optional-catch-binding.html.
In JS, as opposed to TS, we allow unused catch bindings if the variable names are prefixed with an underscore. This is so that JS targeting older JS interpreters can write `catch (_) {}` if needed. With TS we disallow unused catch bindings since tsc can compile code to its target JS version.
How
---
Added `caughtErrors: 'all'` to the no-unused-vars rule's configuration. As part of this change, I made the TypeScript linting rules apply only to .ts/.tsx/.ts.d files and updated the unit test snapshots.
Test Plan
---
Added unit tests to the linter. Ran linter over all modules in this repo with expotools.
show more ...
|
| #
8d307f52 |
| 23-Mar-2022 |
Evan Bacon <[email protected]> |
chore: refactor `expo/cli` to `@expo/cli` package (#16717)
* chore: refactor `expo/cli` to `@expo/cli` package
* Update CODEOWNERS
* fix linking
* fix lint script
* fix build file
* f
chore: refactor `expo/cli` to `@expo/cli` package (#16717)
* chore: refactor `expo/cli` to `@expo/cli` package
* Update CODEOWNERS
* fix linking
* fix lint script
* fix build file
* fix e2e tests
* lint before build
* use mock version
show more ...
|