mirror of
https://github.com/google/blockly.git
synced 2026-04-26 23:20:22 +02:00
chore(docs): update README docs on formatting and linting
This commit is contained in:
+10
-2
@@ -33,17 +33,25 @@ This command generates static content into the `build` directory and can be serv
|
||||
npm run serve
|
||||
```
|
||||
|
||||
The build folder is now served at http://localhost:3000/.
|
||||
The build folder is now served at http://localhost:3000/
|
||||
|
||||
## Linting
|
||||
## Formatting and linting
|
||||
|
||||
```bash
|
||||
# check formatting:
|
||||
npm run format:check
|
||||
# fix formatting:
|
||||
npm run format
|
||||
# check linting:
|
||||
npm run lint
|
||||
# fix linting:
|
||||
npm run lint:fix
|
||||
```
|
||||
|
||||
Prettier is used for formatting JavaScript files (the `format` script).
|
||||
|
||||
ESlint is used for linting `.md` and `.mdx` files due to poor support for these in Prettier (the `lint` script).
|
||||
|
||||
## Generating reference docs
|
||||
|
||||
The API reference pages are auto-generated from the Blockly TypeScript source using `@microsoft/api-extractor` and `@microsoft/api-documenter`. This is a separate step from the Docusaurus build and must be run from the `packages/blockly` directory:
|
||||
|
||||
Reference in New Issue
Block a user