You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #261 from brettz9/replaces-docs
feat: add settings `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` and apply to `require-param`, `require-description`, `require-example`, and `require-returns` for exempting all of these from errors in the case of the presence of `@override`, `@Augments`/`@extends`, or `@implements`, respectively.
This commit also adds the following new behavior: with `require-description`, `inheritdoc` will avoid erring.
This commit also causes the following non-breaking changes:
With `require-example` and `require-returns`, `@override` may now err if the setting `overrideReplacesDocs` is set to false
With `require-returns`, `@implements` may now err if the setting `implementsReplacesDocs` is set to false
With `require-example`, `require-returns`, and `require-description`, `@Augments` or `@extends` may now avoid erring if the setting `augmentsExtendsReplacesDocs` is set to true
Deprecating `settings.jsdoc.allowOverrideWithoutParam`, `settings.jsdoc.allowImplementsWithoutParam`, and `settings.jsdoc.allowAugmentsExtendsWithoutParam` in favor of the more tag-independent settings.
*[Additional Tag Names](#eslint-plugin-jsdoc-settings-additional-tag-names)
20
-
*[Allow `@override` Without Accompanying `@param` Tags](#eslint-plugin-jsdoc-settings-allow-override-without-accompanying-param-tags)
20
+
*[`@override`/`@augments`/`@extends`/`@implements` Without Accompanying `@param`/`@description`/`@example`/`@returns`](#eslint-plugin-jsdoc-settings-override-augments-extends-implements-without-accompanying-param-description-example-returns)
21
21
*[Settings to Configure `check-types` and `no-undefined-types`](#eslint-plugin-jsdoc-settings-settings-to-configure-check-types-and-no-undefined-types)
22
22
*[Settings to Configure `valid-types`](#eslint-plugin-jsdoc-settings-settings-to-configure-valid-types)
23
23
*[Settings to Configure `require-returns`](#eslint-plugin-jsdoc-settings-settings-to-configure-require-returns)
@@ -241,19 +241,17 @@ tags in the rule `check-tag-names`. The format of the configuration is as follow
### <code>@override</code>/<code>@augments</code>/<code>@extends</code>/<code>@implements</code> Without Accompanying <code>@param</code>/<code>@description</code>/<code>@example</code>/<code>@returns</code>
246
246
247
-
Use any of the following settings to override `require-param` and allow
248
-
`@param` to be omitted when the specified tags are present on the JSDoc
249
-
comment or the parent class comment. The default value for each is `false`.
247
+
The following settings allows the element(s) they reference to be omitted
248
+
on the JSDoc comment block of the function or that of its parent class
249
+
for any of the "require" rules (i.e., `require-param`, `require-description`,
250
+
`require-example`, or `require-returns`).
250
251
251
-
*`settings.jsdoc.allowOverrideWithoutParam` - Enables behavior with
252
-
`@override` tag
253
-
*`settings.jsdoc.allowImplementsWithoutParam` - Enables behavior with
254
-
`@implements` tag
255
-
*`settings.jsdoc.allowAugmentsExtendsWithoutParam` - Enables behavior with
256
-
`@augments` tag or its synonym `@extends`
252
+
*`settings.jsdoc.overrideReplacesDocs` (`@override`) - Defaults to `true`
253
+
*`settings.jsdoc.augmentsExtendsReplacesDocs` (`@augments` or its alias `@extends`) - Defaults to `false`.
254
+
*`settings.jsdoc.implementsReplacesDocs` (`@implements`) - Defaults to `false`
257
255
258
256
The format of the configuration is as follows:
259
257
@@ -262,14 +260,19 @@ The format of the configuration is as follows:
262
260
"rules": {},
263
261
"settings": {
264
262
"jsdoc": {
265
-
"allowOverrideWithoutParam": true,
266
-
"allowImplementsWithoutParam": true,
267
-
"allowAugmentsExtendsWithoutParam": true
263
+
"overrideReplacesDocs": true,
264
+
"augmentsExtendsReplacesDocs": true,
265
+
"implementsReplacesDocs": true
268
266
}
269
267
}
270
268
}
271
269
```
272
270
271
+
`settings.jsdoc.allowOverrideWithoutParam`,
272
+
`settings.jsdoc.allowImplementsWithoutParam`, and
273
+
`settings.jsdoc.allowAugmentsExtendsWithoutParam` performed a similar function
274
+
but restricted to `@param`. These settings are now deprecated.
0 commit comments