Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in README.md #3

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ You can install this package via npm:

## Tagging your Code as a Best Practice

You can tag blocks of code as a best practices with specially formatted
You can tag blocks of code as best practices with specially formatted
comments:

```tsx
// @BestPractice React Components
// @BestPractice.subtitle State Updates
// @BestPracitce.description
// @BestPractice.description
// If you need to update state based on the current value, use
// the functional version of the state setter rather than using
// the `value`. This keeps `useCallback` from creating a new function
// every time the value changes.
// every time the value changes.
const [value, setValue] = useState(0);
const incrementValue = useCallback(
() => setValue((currentValue) => currentValue + 1),
Expand All @@ -62,7 +62,7 @@ To extract your best practices documentation, you can invoke our CLI tool:

npx best-practices write -s src/ -d docs/best-practices -u "https://github.com/<your org>/<your repo>/tree/main"

This will scan through your code in `src` and build best practices markdown
This will scan through your code in `src` and build best practices Markdown
files from your tagged code. The contents of the `-d` directory will be
completely overwritten, so make sure you point to a directory that doesn't
contain any manually written documentation.
Expand All @@ -87,12 +87,12 @@ a CI step.

There are several strategies for keeping your docs up-to-date:

1. Create a pre-commit hook that will run `best-pracitces write`
2. Create a pre-commit hook that will run `best-pracitces check`
3. Create a CI step that will run `best-pracitces check`
1. Create a pre-commit hook that will run `best-practices write`
2. Create a pre-commit hook that will run `best-practices check`
3. Create a CI step that will run `best-practices check`
4. If you have a documentation system that automatically creates a static
documentation site from your docs, you may be able to hook in the
`best-pracitces` command as part of that.
`best-practices` command as part of that.

## Customizing Docs Generation

Expand Down