Commit c70a3ff
authored
BREAKING: Update
This updates the `jsdoc/require-jsdoc` rule to require documentation
for:
- Arrow functions.
```ts
const myFunction = () => {
// ...
};
```
- Class declarations.
```ts
class MyClass {
// ...
}
```
- TypeScript enum declarations.
```ts
enum MyEnum {
// ...
};
```
- Function expressions.
```ts
const myFunction = function () {
// ...
};
```
- TypeScript interface declarations.
```ts
interface MyInterface {
// ...
};
```
- Method definitions.
```ts
const myObject = {
myFunction() {
// ...
},
};
```
- TypeScript type alias declarations.
```ts
type MyType = {
// ...
};
- TypeScript property signatures.
```ts
type MyType = {
myProperty: string;
};
```
## Breaking changes
Each of the code blocks above was previously valid, but will now produce
an error.
Closes #223.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Expands `jsdoc/require-jsdoc` to require JSDoc on more JS/TS
constructs and adds a brief doc comment to `ConfigWithExtends.extends`.
>
> - **ESLint config (`packages/base/src/index.mjs`,
`packages/base/rules-snapshot.json`)**:
> - Expand `jsdoc/require-jsdoc` from a simple enablement to a
configured rule requiring docs for:
> - `ArrowFunctionExpression`, `ClassDeclaration`,
`FunctionDeclaration`, `FunctionExpression`, `MethodDefinition`.
> - TS contexts: `TSInterfaceDeclaration`, `TSTypeAliasDeclaration`,
`TSEnumDeclaration`, `TSPropertySignature`.
> - **Types (`packages/base/src/index.d.mts`)**:
> - Add JSDoc for `ConfigWithExtends`.`extends` detailing supported
shapes.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e0efa13. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->jsdoc/require-jsdoc to require documentation for more things (#394)1 parent 636bc75 commit c70a3ff
3 files changed
+40
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
180 | 197 | | |
181 | 198 | | |
182 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
397 | 414 | | |
398 | 415 | | |
399 | 416 | | |
| |||
0 commit comments