From 7124bbd1e2725e3f6b94abbb8c636047003bbc92 Mon Sep 17 00:00:00 2001 From: pengoosedev <73521518+pengoosedev@users.noreply.github.com> Date: Fri, 18 Oct 2024 03:31:35 +0900 Subject: [PATCH] docs: improve readability with additional subheaders(CONTRIBUTING.md) --- CONTRIBUTING.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb06a17e77..9e89b7cf13 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,6 +8,8 @@ If you are passioned about a bug/feature, but cannot find an issue describing it ## Make a change +### Set environment + Make sure you're running Node.js 20 or later. ```bash node --version @@ -28,12 +30,17 @@ npx playwright install Playwright is a multi-package repository that uses npm workspaces. For browser APIs, look at [`packages/playwright-core`](https://github.com/microsoft/playwright/blob/main/packages/playwright-core). For test runner, see [`packages/playwright`](https://github.com/microsoft/playwright/blob/main/packages/playwright). -Note that some files are generated by the build, so the watch process might override your changes if done in the wrong file. For example, TypeScript types for the API are generated from the [`docs/src`](https://github.com/microsoft/playwright/blob/main/docs/src). +### TypeScript Type Generation + +If your changes involve `TypeScript types`, ensure to modify the corresponding files in [`docs/src`](https://github.com/microsoft/playwright/blob/main/docs/src). +Note that some files are generated by the build, so the watch process might override your changes if done in the wrong file. For example, TypeScript types for the API are generated from this directory. + +### Linting Coding style is fully defined in [.eslintrc](https://github.com/microsoft/playwright/blob/main/.eslintrc.js). Before creating a pull request, or at any moment during development, run linter to check all kinds of things: - ```bash - npm run lint - ``` +```bash +npm run lint +``` Comments should be generally avoided. If the code would not be understood without comments, consider re-writing the code to make it self-explanatory.