Skip to content

Commit

Permalink
docs: recommended-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Mar 19, 2023
1 parent 07ba155 commit 921cedd
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .README/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,37 @@ as failing errors, you may use the "recommended-error" config:
}
```

If you plan to use TypeScript syntax (and not just "typescript"
`mode` to indicate the JSDoc flavor is TypeScript), you can configure
the following:

```javascript
{
"rules": {
"jsdoc/no-types": 1,
"jsdoc/require-param-type": 0,
"jsdoc/require-property-type": 0,
"jsdoc/require-returns-type": 0,
}
}
```

...or just use:

```json
{
"extends": ["plugin:jsdoc/recommended-typescript"]
}
```

...or to report with failing errors instead of mere warnings:

```json
{
"extends": ["plugin:jsdoc/recommended-typescript-error"]
}
```

## Options

Rules may, as per the [ESLint user guide](https://eslint.org/docs/user-guide/configuring), have their own individual options. In `eslint-plugin-jsdoc`, a few options,
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,37 @@ as failing errors, you may use the "recommended-error" config:
}
```

If you plan to use TypeScript syntax (and not just "typescript"
`mode` to indicate the JSDoc flavor is TypeScript), you can configure
the following:

```javascript
{
"rules": {
"jsdoc/no-types": 1,
"jsdoc/require-param-type": 0,
"jsdoc/require-property-type": 0,
"jsdoc/require-returns-type": 0,
}
}
```

...or just use:

```json
{
"extends": ["plugin:jsdoc/recommended-typescript"]
}
```

...or to report with failing errors instead of mere warnings:

```json
{
"extends": ["plugin:jsdoc/recommended-typescript-error"]
}
```

<a name="user-content-eslint-plugin-jsdoc-options"></a>
<a name="eslint-plugin-jsdoc-options"></a>
## Options
Expand Down

0 comments on commit 921cedd

Please sign in to comment.