Skip to content

Commit

Permalink
Add instructions for local prettier linting (#1880)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Sep 25, 2023
1 parent e0e245f commit 7baed13
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,25 @@ done
fi
```

### Lint JS and Markdown files with Prettier on save

1. Install the [Prettier VS Code Extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).
2. Run `npm install` in the docs folder you have the docs checked out in.
3. Inside VS code, open `settings.json` by pressing `CMD+SHIFT+P` and typing in settings and ensure the following settings are in the file:

```json
"[markdown]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.configPath": ".prettierrc",
"prettier.documentSelectors": ["**/*.md"],
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
"prettier.withNodeModules": true,
"prettier.resolveGlobalModules": true,
"prettier.requirePragma": true
```

## Publishing

The docs are automatically published when a PR merges.
Expand Down

0 comments on commit 7baed13

Please sign in to comment.