Skip to content

Commit

Permalink
Add note to rules re. dependencies warning (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Jul 5, 2024
1 parent 3d03cde commit 71e89a2
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions packages/docs/src/content/docs/features/rules-and-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,23 @@ Also see the [list of issue types][2].

### Shorthands

Use the `--dependencies` or `--exports` flag to combine groups of related types:
Knip has shortcuts to include only specific issue types.

- The `--dependencies` includes (dev) `dependencies`, `unlisted`, `binaries` and
`unresolved`
- The `--exports` flag has`exports`, `nsExports`, `classMembers`, `types`,
`nsTypes`, `enumMembers` and `duplicates`
1. The `--dependencies` flag includes:

- `dependencies` (and `devDependencies` + `optionalPeerDependencies`)
- `unlisted`
- `binaries`
- `unresolved`

2. The `--exports` flag includes:

- `exports`
- `types`
- `enumMembers`
- `duplicates`

3. The `--files` flag is a shortcut for `--include files`

## Rules

Expand All @@ -71,6 +82,9 @@ Example:

Also see the [issue types overview][2].

NOTE: If the `dependencies` issue type is included, the `devDependencies` and
`optionalPeerDependencies` types can still be set to `"warn"` separately.

The rules are modeled after the ESLint `rules` configuration, and could be
extended in the future.

Expand Down

0 comments on commit 71e89a2

Please sign in to comment.