Skip to content

Commit

Permalink
docs: improve section flow by moving lint to the end
Browse files Browse the repository at this point in the history
  • Loading branch information
pengooseDev committed Oct 18, 2024
1 parent cafde16 commit 4c6c539
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ Playwright is a multi-package repository that uses npm workspaces. For browser A
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.

### Write documentation

Every part of the public API should be documented in [`docs/src`](https://github.com/microsoft/playwright/blob/main/docs/src), in the same change that adds/changes the API. We use markdown files with custom structure to specify the API. Take a look around for an example.

Various other files are generated from the API specification. If you are running `npm run watch`, these will be re-generated automatically.

Larger changes will require updates to the documentation guides as well. This will be made clear during the code review.

### 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:
Expand All @@ -44,14 +52,6 @@ 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.

### Write documentation

Every part of the public API should be documented in [`docs/src`](https://github.com/microsoft/playwright/blob/main/docs/src), in the same change that adds/changes the API. We use markdown files with custom structure to specify the API. Take a look around for an example.

Various other files are generated from the API specification. If you are running `npm run watch`, these will be re-generated automatically.

Larger changes will require updates to the documentation guides as well. This will be made clear during the code review.

## Add a test

Playwright requires a test for almost any new or modified functionality. An exception would be a pure refactoring, but chances are you are doing more than that.
Expand Down

0 comments on commit 4c6c539

Please sign in to comment.