Skip to content

Commit

Permalink
docs: update info on default mode
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed May 7, 2023
1 parent 055adf8 commit 4eaf868
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .README/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ how many line breaks to add when a block is missing.
### Mode

- `settings.jsdoc.mode` - Set to `typescript`, `closure`, or `jsdoc` (the
default unless the `@typescript-eslint` parser is in use in which case
`typescript` will be the default).
default is now `typescript`).
Note that if you do not wish to use separate `.eslintrc.*` files for a
project containing both JavaScript and TypeScript, you can also use
[`overrides`](https://eslint.org/docs/user-guide/configuring). You may also
Expand All @@ -51,6 +50,12 @@ how many line breaks to add when a block is missing.
- Disallows namepath on `@interface` for "closure" mode in `valid-types` (and
avoids checking in other rules)

Note that if you are using TypeScript syntax (and not just the TypeScript
flavor of JSDoc which `mode` set to "typescript" implies), you may wish
to use the `recommended-typescript` or `recommended-typescript-error`
config. This will add rules such as `jsdoc/no-types` to expect you have
no types expressed in JSDoc (since these can be added in TypeScript).

### Alias Preference

Use `settings.jsdoc.tagNamePreference` to configure a preferred alias name for
Expand Down
9 changes: 7 additions & 2 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ how many line breaks to add when a block is missing.
### Mode

- `settings.jsdoc.mode` - Set to `typescript`, `closure`, or `jsdoc` (the
default unless the `@typescript-eslint` parser is in use in which case
`typescript` will be the default).
default is now `typescript`).
Note that if you do not wish to use separate `.eslintrc.*` files for a
project containing both JavaScript and TypeScript, you can also use
[`overrides`](https://eslint.org/docs/user-guide/configuring). You may also
Expand All @@ -68,6 +67,12 @@ how many line breaks to add when a block is missing.
- Disallows namepath on `@interface` for "closure" mode in `valid-types` (and
avoids checking in other rules)

Note that if you are using TypeScript syntax (and not just the TypeScript
flavor of JSDoc which `mode` set to "typescript" implies), you may wish
to use the `recommended-typescript` or `recommended-typescript-error`
config. This will add rules such as `jsdoc/no-types` to expect you have
no types expressed in JSDoc (since these can be added in TypeScript).

<a name="user-content-settings-alias-preference"></a>
<a name="settings-alias-preference"></a>
### Alias Preference
Expand Down

0 comments on commit 4eaf868

Please sign in to comment.