From 3a85dbb013ad2b430dafe18538943cb3190917a5 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 16 Mar 2023 07:17:17 -0700 Subject: [PATCH] Add VS Code workspace config Summary: Adds and recommends use of `metro.code-workspace` file when using VS Code. This disables the built-in TypeScript Language Service for `.js` files, recommends extensions, enables `formatOnSave`, and configures Flow language support. Changelog: Internal Reviewed By: motiz88 Differential Revision: D44062436 fbshipit-source-id: 94c8267b859ebf771974e3c21eaef9002c30a678 --- CONTRIBUTING.md | 23 ++++++++--------------- docs/Configuration.md | 2 +- metro.code-workspace | 19 +++++++++++++++++++ website/README.md | 2 +- 4 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 metro.code-workspace diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a7dece337..1e3cc7ac38 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,9 +10,9 @@ Facebook has adopted a Code of Conduct that we expect project participants to ad The core team works directly on GitHub and all work is public. -### `master` is unsafe +### `main` is unsafe -We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and always version appropriately so you can lock into a specific version if need be. +We will do our best to keep `main` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and always version appropriately so you can lock into a specific version if need be. ### Workflow and Pull Requests @@ -20,7 +20,7 @@ The core team will be monitoring for pull requests. When we get one, we'll run s *Before* submitting a pull request, please make sure the following is doneā€¦ -1. Fork the repo and create your branch from `master`. +1. Fork the repo and create your branch from `main`. ```sh git clone https://github.com/facebook/metro @@ -34,18 +34,11 @@ The core team will be monitoring for pull requests. When we get one, we'll run s yarn ``` -3. If you've added code that should be tested, add tests. You - can use watch mode that continuously transforms changed files - to make your life easier. - - ```sh - # in the background - npm run watch - ``` - -4. If you've changed APIs, update the documentation. -5. Ensure the test suite passes via `npm test`. -6. If you haven't already, complete the CLA. +3. Code in this repo is typechecked with [Flow](https://flow.org/). [Optional] If you are using VS Code, we recommend opening the `metro.code-workspace` file, which should configure the Flow Language Service and other workspace settings correctly. +4. If you've added code that should be tested, add tests. +5. If you've changed APIs, update the documentation. +6. Ensure the test suite passes via `npm test`. +7. If you haven't already, complete the CLA. ### Contributor License Agreement (CLA) diff --git a/docs/Configuration.md b/docs/Configuration.md index ba0644c162..4af2091e4d 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -14,7 +14,7 @@ You can also give a custom file to the configuration by specifying `--config