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
Copy file name to clipboardExpand all lines: .README/README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,31 @@ above as "recommended":
81
81
82
82
You can then selectively add to or override the recommended rules.
83
83
84
+
## Options
85
+
86
+
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,
87
+
such as, `exemptedBy` and `contexts`, may be used across different rules.
88
+
89
+
`eslint-plugin-jsdoc` options, if present, are in the form of an object
90
+
supplied as the second argument in an array after the error level.
91
+
92
+
```js
93
+
// `.eslintrc.js`
94
+
{
95
+
rules: {
96
+
'jsdoc/require-example': [
97
+
// The Error level should be `error`, `warn`, or `off` (or 2, 1, or 0)
98
+
'error',
99
+
// The options vary by rule, but are added to an options object:
100
+
{
101
+
avoidExampleOnConstructors:true,
102
+
exemptedBy: ['type']
103
+
}
104
+
]
105
+
}
106
+
}
107
+
```
108
+
84
109
## Settings
85
110
86
111
### Allow `@private` to disable rules for that comment block
*[Allow `@private` to disable rules for that comment block](#eslint-plugin-jsdoc-settings-allow-private-to-disable-rules-for-that-comment-block)
16
17
*[Mode](#eslint-plugin-jsdoc-settings-mode)
@@ -120,6 +121,32 @@ above as "recommended":
120
121
121
122
You can then selectively add to or override the recommended rules.
122
123
124
+
<aname="eslint-plugin-jsdoc-options"></a>
125
+
## Options
126
+
127
+
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,
128
+
such as, `exemptedBy` and `contexts`, may be used across different rules.
129
+
130
+
`eslint-plugin-jsdoc` options, if present, are in the form of an object
131
+
supplied as the second argument in an array after the error level.
132
+
133
+
```js
134
+
// `.eslintrc.js`
135
+
{
136
+
rules: {
137
+
'jsdoc/require-example': [
138
+
// The Error level should be `error`, `warn`, or `off` (or 2, 1, or 0)
139
+
'error',
140
+
// The options vary by rule, but are added to an options object:
141
+
{
142
+
avoidExampleOnConstructors:true,
143
+
exemptedBy: ['type']
144
+
}
145
+
]
146
+
}
147
+
}
148
+
```
149
+
123
150
<aname="eslint-plugin-jsdoc-settings"></a>
124
151
## Settings
125
152
@@ -464,12 +491,12 @@ function quux (foo) {}
464
491
465
492
Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
This rule allows one optional string argument. If it is `"always"` then a problem is raised when there is no newline after the description. If it is `"never"` then a problem is raised when there is a newline after the description. The default value is `"always"`.
@@ -3950,7 +3977,7 @@ The following types are always considered defined.
3950
3977
Note that preferred types indicated within `settings.jsdoc.preferredTypes` will
This rule takes one optional string argument. If it is `"always"` then a problem is raised when there is no hyphen before the description. If it is `"never"` then a problem is raised when there is a hyphen before the description. The default value is `"always"`.
@@ -5352,7 +5379,7 @@ function quux () {
5352
5379
Checks for presence of jsdoc comments, on class declarations as well as
0 commit comments