Skip to content

Commit ac7619a

Browse files
authored
chore: Fix documentation generation warnings. (#9325)
* chore: Replace @yields with @returns. * fix: Update the ESLint config to not require @yields. * chore: Move docs onto getters.
1 parent 405f7da commit ac7619a

4 files changed

Lines changed: 5 additions & 9 deletions

File tree

core/block.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ export class Block {
11261126
/**
11271127
* Returns a generator that provides every field on the block.
11281128
*
1129-
* @yields A generator that can be used to iterate the fields on the block.
1129+
* @returns A generator that can be used to iterate the fields on the block.
11301130
*/
11311131
*getFields(): Generator<Field, undefined, void> {
11321132
for (const input of this.inputList) {

core/field.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ export abstract class Field<T = any>
119119
return this.size;
120120
}
121121

122-
/**
123-
* Sets the size of this field.
124-
*/
125122
protected set size_(newValue: Size) {
126123
this.size = newValue;
127124
}

core/field_input.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,9 @@ export abstract class FieldInput<T extends InputTypes> extends Field<
102102
*/
103103
override SERIALIZABLE = true;
104104

105-
/**
106-
* Sets the size of this field. Although this appears to be a no-op, it must
107-
* exist since the getter is overridden below.
108-
*/
109105
protected override set size_(newValue: Size) {
106+
// Although this appears to be a no-op, it must exist since the getter is
107+
// overridden below.
110108
super.size_ = newValue;
111109
}
112110

eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ function buildTSOverride({files, tsconfig}) {
8989
'@typescript-eslint/no-explicit-any': ['off'],
9090
// We use this pattern extensively for block (e.g. controls_if) interfaces.
9191
'@typescript-eslint/no-empty-object-type': ['off'],
92-
92+
// TSDoc doesn't support @yields, so don't require that we use it.
93+
'jsdoc/require-yields': ['off'],
9394
// params and returns docs are optional.
9495
'jsdoc/require-param-description': ['off'],
9596
'jsdoc/require-returns': ['off'],

0 commit comments

Comments
 (0)