diff --git a/src/components/action-bar/examples/action-bar-as-list-component.tsx b/src/components/action-bar/examples/action-bar-as-list-component.tsx index 281692f6db..fe2e69c555 100644 --- a/src/components/action-bar/examples/action-bar-as-list-component.tsx +++ b/src/components/action-bar/examples/action-bar-as-list-component.tsx @@ -15,8 +15,8 @@ import { Component, h } from '@stencil/core'; * There should be a `min-width` and `max-width` on the component in order to prevent * the overflow menu to cause infinite rendering loops. * ::: - * @link action-bar-in-list.tsx - * @link action-bar-in-list.scss + * @sourceFileLink action-bar-in-list.tsx + * @sourceFileLink action-bar-in-list.scss */ @Component({ tag: 'limel-example-action-bar-as-primary-component', diff --git a/src/components/badge/format.ts b/src/components/badge/format.ts index d154a3d08b..013e7250fa 100644 --- a/src/components/badge/format.ts +++ b/src/components/badge/format.ts @@ -2,8 +2,8 @@ import NumAbbr from 'number-abbreviate'; /** * Abbreviate a number - * @param {number} value the number to abbreviate - * @returns {string} abbreviated number + * @param value - the number to abbreviate + * @returns abbreviated number */ export function abbreviate(value: number): string { if (typeof value !== 'number') { diff --git a/src/components/breadcrumbs/breadcrumbs.spec.tsx b/src/components/breadcrumbs/breadcrumbs.spec.tsx index 5e230d7236..85dcd89fc6 100644 --- a/src/components/breadcrumbs/breadcrumbs.spec.tsx +++ b/src/components/breadcrumbs/breadcrumbs.spec.tsx @@ -163,9 +163,8 @@ describe('limel-breadcrumbs', () => { * Ids are randomly generated and we do not have access to them as they * are inside the breadcrumbs component. But we can get them this way. * Retrieves ids via inorder traversal - * @param {Element} node base node - * @param {string[]} ids id array that you wish to populate - * @return void + * @param node - base node + * @param ids - id array that you wish to populate */ function getIDs(node: Element, ids: string[]) { if (node.children && node.id) { diff --git a/src/components/chip-set/chip-set-input-helpers.ts b/src/components/chip-set/chip-set-input-helpers.ts index a5d28771f6..c59011c091 100644 --- a/src/components/chip-set/chip-set-input-helpers.ts +++ b/src/components/chip-set/chip-set-input-helpers.ts @@ -16,8 +16,8 @@ import { /** * Key handler for the input field. * Lets the user select, activate, and remove chips with the keyboard. - * @param {KeyboardEvent} event event - * @returns {void} + * @param event - event + */ export function handleKeyboardEvent(event: KeyboardEvent) { if (this.textValue.length) { diff --git a/src/components/chip-set/chip-set.tsx b/src/components/chip-set/chip-set.tsx index 2d4fa1cddd..dbde18271b 100644 --- a/src/components/chip-set/chip-set.tsx +++ b/src/components/chip-set/chip-set.tsx @@ -224,7 +224,7 @@ export class ChipSet { /** * Used to find out whether the chip-set is in edit mode. - * @returns {Promise} `true` if the chip-set is in edit mode, `false` otherwise. + * @returns `true` if the chip-set is in edit mode, `false` otherwise. */ @Method() public async getEditMode(): Promise { @@ -233,8 +233,8 @@ export class ChipSet { /** * Used to set focus to the chip-set input field. - * @param {boolean} emptyInput if `true`, any text in the input is discarded - * @returns {Promise} does not return anything, but methods have to be async + * @param emptyInput - if `true`, any text in the input is discarded + * @returns does not return anything, but methods have to be async */ @Method() public async setFocus(emptyInput: boolean = false) { @@ -254,7 +254,7 @@ export class ChipSet { /** * Used to empty the input field. Used in conjunction with `emptyInputOnBlur` to let the * consumer control when the input is emptied. - * @returns {Promise} does not return anything, but methods have to be async + * @returns does not return anything, but methods have to be async */ @Method() public async emptyInput() { @@ -499,7 +499,7 @@ export class ChipSet { /** * Enter edit mode when the text field receives focus. When editMode is true, the input element will be visible - * @returns {void} + */ private handleTextFieldFocus() { if (this.disabled || this.readonly) { @@ -517,7 +517,7 @@ export class ChipSet { /** * Exit edit mode when the input element loses focus. This makes sure the input element does not take up any * additional space when the user it not typing anything - * @returns {void} + */ private handleInputBlur() { if (this.emptyInputOnBlur) { diff --git a/src/components/dock/dock.types.ts b/src/components/dock/dock.types.ts index 3532ebc775..82eff93d6b 100644 --- a/src/components/dock/dock.types.ts +++ b/src/components/dock/dock.types.ts @@ -30,7 +30,7 @@ export interface DockItem { * item is pointing at, or * - the user interface is showing a page which is a sub-location of the * top-level location. For example, when user is at - * _My Account > Notification Settings_, the dock item of _My Account_ + * _My Account ➡ Notification Settings_, the dock item of _My Account_ * should have the `selected` state. */ selected?: boolean; diff --git a/src/components/dock/examples/dock-custom-component.tsx b/src/components/dock/examples/dock-custom-component.tsx index 8280fe484f..2968a8125c 100644 --- a/src/components/dock/examples/dock-custom-component.tsx +++ b/src/components/dock/examples/dock-custom-component.tsx @@ -13,7 +13,7 @@ import { DockItem } from '@limetech/lime-elements'; * `.SCSS` file. That defines the width the popover component, which is `auto` * by default. But modifying it may be helpful depending on the usage. * ::: - * @link my-custom-menu.tsx + * @sourceFileLink my-custom-menu.tsx */ @Component({ diff --git a/src/components/flex-container/flex-container.tsx b/src/components/flex-container/flex-container.tsx index 6c0ffc16bb..be9ceeb2fd 100644 --- a/src/components/flex-container/flex-container.tsx +++ b/src/components/flex-container/flex-container.tsx @@ -9,7 +9,7 @@ import { Component, h, Prop } from '@stencil/core'; * This component is deprecated and will be removed in a future version of * Lime Elements. Please use CSS for your flexible container needs 🙂 * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox - * @deprecated + * @deprecated - Please use CSS instead https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox * @private * @slot - Container content */ diff --git a/src/components/form/adapters/base-adapter.ts b/src/components/form/adapters/base-adapter.ts index 8a54a4eba6..463cbede9f 100644 --- a/src/components/form/adapters/base-adapter.ts +++ b/src/components/form/adapters/base-adapter.ts @@ -22,8 +22,8 @@ import { * really means "can be properly rendered to the dom by react". It just so * happens that react can render most primitives to the dom correctly. * @see https://developer.mozilla.org/en-US/docs/Glossary/Primitive - * @param {any} value the value to check - * @returns {boolean} Whether or not the value is primitive + * @param value - the value to check + * @returns Whether or not the value is primitive */ const isPrimitive = (value) => isNil(value) || isNumber(value) || isString(value) || isBoolean(value); @@ -75,9 +75,9 @@ export class LimeElementsAdapter extends React.Component { /** * Given a key a value set the value of property named `key` to * the value of `value` - * @param {string} key The name of the property - * @param {any} value The value of the property - * @returns {void} + * @param key - The name of the property + * @param value - The value of the property + */ setComponentProperty(key: string, value: any): void { const element = this.component.current; @@ -89,8 +89,8 @@ export class LimeElementsAdapter extends React.Component { * * Events must be bound using this function otherwise events will bubble up too far * since react events are different that native dom events - * @param {string} eventName the name of the event to get the handler for - * @returns {any} the handler to bind to the component for the event name + * @param eventName - the name of the event to get the handler for + * @returns the handler to bind to the component for the event name */ getHandler(eventName: string) { const { events } = this.props; @@ -103,8 +103,8 @@ export class LimeElementsAdapter extends React.Component { /** * Set events on the web component - * @param {object} events Event names to handlers - * @returns {void} + * @param events - Event names to handlers + */ setEvents(events: object) { const element = this.component.current; @@ -115,8 +115,8 @@ export class LimeElementsAdapter extends React.Component { /** * Remove events on the web component - * @param {object} events Event names to handlers - * @returns {void} + * @param events - Event names to handlers + */ removeEvents(events: object) { const element = this.component.current; @@ -127,9 +127,9 @@ export class LimeElementsAdapter extends React.Component { /** * Get the events to remove from the component - * @param {object} prevEvents previous events - * @param {object} nextEvents new events - * @returns {object} the events to remove + * @param prevEvents - previous events + * @param nextEvents - new events + * @returns the events to remove */ getEventsToRemove(prevEvents: object, nextEvents: object): object { return pickBy( @@ -140,9 +140,9 @@ export class LimeElementsAdapter extends React.Component { /** * Get the events to add to the component - * @param {object} prevEvents previous events - * @param {object} nextEvents new events - * @returns {object} the events to add + * @param prevEvents - previous events + * @param nextEvents - new events + * @returns the events to add */ getEventsToAdd(prevEvents: object, nextEvents: object): object { return pickBy( @@ -155,7 +155,7 @@ export class LimeElementsAdapter extends React.Component { * Detect if event handlers have changed. If they * have changed, store them in the state, and remove and * re-add the changed event handlers - * @returns {void} + */ updateEvents() { const { prevEvents } = this.state; @@ -185,8 +185,8 @@ export class LimeElementsAdapter extends React.Component { /** * Get non primitive props. i.e. object, function, array, etc - * @param {object} elementProps the props to pass the webcomponet - * @returns {object} non primitive props + * @param elementProps - the props to pass the webcomponet + * @returns non primitive props */ getNonPrimitiveProps(elementProps: object) { return pickBy(elementProps, negate(isPrimitive)); @@ -194,8 +194,8 @@ export class LimeElementsAdapter extends React.Component { /** * Get primitive props. i.e. integer, boolean, etc - * @param {object} elementProps the props to pass the webcomponet - * @returns {object} primitive props + * @param elementProps - the props to pass the webcomponet + * @returns primitive props */ getPrimitiveProps(elementProps: object): object { return pickBy(elementProps, isPrimitive); @@ -205,9 +205,9 @@ export class LimeElementsAdapter extends React.Component { * Given the previous renders props and the next renders props, * check if any of the property values have changed and return an * object with only those values - * @param {object} prevNonPrimitiveProps the previous renders non primitive props - * @param {object} nextNonPrimitiveProps the current renders non primitive props - * @returns {object} the changed primitive props + * @param prevNonPrimitiveProps - the previous renders non primitive props + * @param nextNonPrimitiveProps - the current renders non primitive props + * @returns the changed primitive props */ getChangedNonPrimitiveProps( prevNonPrimitiveProps: object, @@ -226,8 +226,8 @@ export class LimeElementsAdapter extends React.Component { * instead of passing them as props the the React.createElement * function because non primitive props are not passed properly to the web * component via React.createElement - * @param {object} elementProps element props to set - * @returns {void} + * @param elementProps - element props to set + */ setNonPrimitives(elementProps: object): void { toPairs(elementProps).forEach(([key, value]) => diff --git a/src/components/form/examples/basic-form.tsx b/src/components/form/examples/basic-form.tsx index b1549d2817..49d975aa9a 100644 --- a/src/components/form/examples/basic-form.tsx +++ b/src/components/form/examples/basic-form.tsx @@ -4,7 +4,7 @@ import { schema } from './basic-schema'; /** * Basic form with validation - * @link basic-schema.ts + * @sourceFileLink basic-schema.ts */ @Component({ tag: 'limel-example-form', diff --git a/src/components/form/examples/custom-component-form.tsx b/src/components/form/examples/custom-component-form.tsx index 3ee368bfb8..22c66d9f33 100644 --- a/src/components/form/examples/custom-component-form.tsx +++ b/src/components/form/examples/custom-component-form.tsx @@ -28,8 +28,8 @@ import { schema } from './custom-component-schema'; * While you can, in principle, use any component in a form, your custom form * components should implement the [FormComponent](#/type/FormComponent/) * interface. - * @link custom-component-schema.ts - * @link custom-component-picker.tsx + * @sourceFileLink custom-component-schema.ts + * @sourceFileLink custom-component-picker.tsx */ @Component({ tag: 'limel-example-custom-component-form', diff --git a/src/components/form/examples/custom-component-picker.tsx b/src/components/form/examples/custom-component-picker.tsx index 73f60da046..91dd8ce995 100644 --- a/src/components/form/examples/custom-component-picker.tsx +++ b/src/components/form/examples/custom-component-picker.tsx @@ -11,37 +11,37 @@ import { }) export class CustomPickerExample implements FormComponent { /** - * @inheritdoc + * {@inheritdoc} */ @Prop({ reflect: true }) public value: number; /** - * @inheritdoc + * {@inheritdoc} */ @Prop({ reflect: true }) public label: string; /** - * @inheritdoc + * {@inheritdoc} */ @Prop({ reflect: true }) public required: boolean; /** - * @inheritdoc + * {@inheritdoc} */ @Prop({ reflect: true }) public readonly: boolean; /** - * @inheritdoc + * {@inheritdoc} */ @Prop({ reflect: true }) public disabled: boolean; /** - * @inheritdoc + * {@inheritdoc} */ @Prop({ reflect: true }) public helperText?: string; diff --git a/src/components/form/examples/custom-error-message-form.tsx b/src/components/form/examples/custom-error-message-form.tsx index c46f7b6572..ea50b8a451 100644 --- a/src/components/form/examples/custom-error-message-form.tsx +++ b/src/components/form/examples/custom-error-message-form.tsx @@ -4,7 +4,7 @@ import { schema } from './custom-error-message-schema'; /** * Form with custom error message - * @link custom-error-message-schema.ts + * @sourceFileLink custom-error-message-schema.ts */ @Component({ tag: 'limel-example-custom-error-message', diff --git a/src/components/form/examples/layout-form.tsx b/src/components/form/examples/layout-form.tsx index 30224e1092..ffb925a867 100644 --- a/src/components/form/examples/layout-form.tsx +++ b/src/components/form/examples/layout-form.tsx @@ -47,7 +47,7 @@ import { schema } from './layout-schema'; * In this example, each collapsible section has its own `colSpan`. * However, since the layout is responsive, make sure to change the browser * window size to see how their responsive layout changes. - * @link layout-schema.ts + * @sourceFileLink layout-schema.ts */ @Component({ tag: 'limel-example-form-layout', diff --git a/src/components/form/examples/list-form.tsx b/src/components/form/examples/list-form.tsx index 6e0a5c5b0d..fd0f9fcf13 100644 --- a/src/components/form/examples/list-form.tsx +++ b/src/components/form/examples/list-form.tsx @@ -3,7 +3,7 @@ import { schema } from './list-schema'; /** * List data - * @link list-schema.ts + * @sourceFileLink list-schema.ts */ @Component({ tag: 'limel-example-list-form', diff --git a/src/components/form/examples/nested-form.tsx b/src/components/form/examples/nested-form.tsx index 7019a4a4e5..3396715da0 100644 --- a/src/components/form/examples/nested-form.tsx +++ b/src/components/form/examples/nested-form.tsx @@ -3,7 +3,7 @@ import { schema } from './nested-schema'; /** * Nested data - * @link nested-schema.ts + * @sourceFileLink nested-schema.ts */ @Component({ tag: 'limel-example-nested-form', diff --git a/src/components/form/examples/props-factory-form.tsx b/src/components/form/examples/props-factory-form.tsx index 6271cf7be3..ceda5b6760 100644 --- a/src/components/form/examples/props-factory-form.tsx +++ b/src/components/form/examples/props-factory-form.tsx @@ -3,8 +3,8 @@ import { schema } from './props-factory-schema'; /** * Using `propsFactory` - * @link props-factory-schema.ts - * @link props-factory-picker.tsx + * @sourceFileLink props-factory-schema.ts + * @sourceFileLink props-factory-picker.tsx */ @Component({ tag: 'limel-example-props-factory-form', diff --git a/src/components/form/examples/row-layout.tsx b/src/components/form/examples/row-layout.tsx index 70d1f26c05..8a1cc53904 100644 --- a/src/components/form/examples/row-layout.tsx +++ b/src/components/form/examples/row-layout.tsx @@ -3,7 +3,7 @@ import { schema } from './row-layout-schema'; /** * Row layout - * @link row-layout-schema.ts + * @sourceFileLink row-layout-schema.ts */ @Component({ tag: 'limel-example-form-row-layout', diff --git a/src/components/form/examples/server-errors.tsx b/src/components/form/examples/server-errors.tsx index 27bafbbb0c..ea09a801a8 100644 --- a/src/components/form/examples/server-errors.tsx +++ b/src/components/form/examples/server-errors.tsx @@ -4,7 +4,7 @@ import { schema } from './list-schema'; /** * Form with server validation - * @link list-schema.ts + * @sourceFileLink list-schema.ts */ @Component({ tag: 'limel-example-server-errors', diff --git a/src/components/form/examples/span-fields.tsx b/src/components/form/examples/span-fields.tsx index a08281375e..9e4aa6921b 100644 --- a/src/components/form/examples/span-fields.tsx +++ b/src/components/form/examples/span-fields.tsx @@ -149,7 +149,7 @@ import { schema } from './span-fields-schema'; * } * ``` * ::: - * @link span-fields-schema.ts + * @sourceFileLink span-fields-schema.ts */ @Component({ tag: 'limel-example-form-span-fields', diff --git a/src/components/form/fields/field-helpers.ts b/src/components/form/fields/field-helpers.ts index 0e97708495..8d528a9c63 100644 --- a/src/components/form/fields/field-helpers.ts +++ b/src/components/form/fields/field-helpers.ts @@ -4,9 +4,9 @@ import { retrieveSchema, ADDITIONAL_PROPERTY_FLAG } from '@rjsf/core/lib/utils'; /** * Given two objects, get a list of keys for each value that is different between * the two objects. Compares using deep comparison - * @param {object} a first object - * @param {object} b second object - * @returns {any[]} the array of keys + * @param a - first object + * @param b - second object + * @returns the array of keys */ const getDifferentKeys = (a: object = {}, b: object = {}): any[] => { const keys = union(Object.keys(a), Object.keys(b)); @@ -21,11 +21,11 @@ const getDifferentKeys = (a: object = {}, b: object = {}): any[] => { * has any other fields that are dependent on it, and if so reset those dependent fields * (by deleting them from the data so that their defaults are populated on the next rerender). * Call onChange with the updated data - * @param {any} oldData The previous data before a data change event - * @param {any} newData The form data from a change event - * @param {object} schema The schema associated with the data - * @param {object} rootSchema The root schema - * @returns {void} + * @param oldData - The previous data before a data change event + * @param newData - The form data from a change event + * @param schema - The schema associated with the data + * @param rootSchema - The root schema + */ export const resetDependentFields = (oldData, newData, schema, rootSchema) => { // Dependencies only exist on object types @@ -63,8 +63,8 @@ export const resetDependentFields = (oldData, newData, schema, rootSchema) => { /** * Check if the schema is of type object and have no declared properties - * @param {any} schema the schema - * @returns {boolean} true if the schema is for a custom object + * @param schema - the schema + * @returns true if the schema is for a custom object */ export function isCustomObjectSchema(schema: any) { if (!schema.additionalProperties) { diff --git a/src/components/form/fields/schema-field.ts b/src/components/form/fields/schema-field.ts index 053e5fe52e..75e609d9cd 100644 --- a/src/components/form/fields/schema-field.ts +++ b/src/components/form/fields/schema-field.ts @@ -19,15 +19,15 @@ import { FieldTemplate } from '../templates'; * and its purpose. * * Example: - * If I have an object { name?: string, email?: string } that I am using a custom web component for `name`, - * then initially, the formData will be {} which is fine because neither name or email are required. Then if i input a - * value for name the formData will be { name: 'some_value' } which is also fine. But then if I want to remove name + * If I have an object `{ name?: string, email?: string }` that I am using a custom web component for `name`, + * then initially, the formData will be `{}` which is fine because neither name or email are required. Then if i input a + * value for name the formData will be `{ name: 'some_value' }` which is also fine. But then if I want to remove name * from the form data I would delete all the text from the name input field. Web components would emit this empty value * as '' or null. If the web component tries to emit `undefined`, null would be emitted instead because CustomEvent has * a default `detail` value of null - * @param {any} value the value associated with the schema - * @param {any} schema the schema for the value - * @returns {boolean} whether or not null should be changed to undefined + * @param value - the value associated with the schema + * @param schema - the schema for the value + * @returns whether or not null should be changed to undefined */ const shouldChangeToUndefined = (value, schema): boolean => { return value === null && !schema.type.includes('null'); @@ -76,9 +76,9 @@ const getCustomComponent = ( /** * Create properties from the factory that is set on `limel-form` - * @param {*} formContext the form context - * @param {*} schema the schema for the current field - * @returns {object} the properties created by the factory + * @param formContext - the form context + * @param schema - the schema for the current field + * @returns the properties created by the factory */ export function getFactoryProps( formContext: any, @@ -283,12 +283,12 @@ export class SchemaField extends React.Component { /** * Gets the path to the current property within the schema - * @param {string} schemaId the id of the schema - * @returns {string[]} an array with the schema path for the current property + * @param schemaId - the id of the schema + * @returns an array with the schema path for the current property * @example * const schemaId = 'root_sections_0_controls_0_name'; * const schemaPath = getSchemaPath(schemaId); - * // => ['sections', '0', 'controls', '0', 'name'] + * // ➡ ['sections', '0', 'controls', '0', 'name'] */ private getSchemaPath(schemaId: string): string[] { if (schemaId === undefined) { diff --git a/src/components/form/templates/common.ts b/src/components/form/templates/common.ts index 0b463d0bcd..626b8b132c 100644 --- a/src/components/form/templates/common.ts +++ b/src/components/form/templates/common.ts @@ -32,10 +32,10 @@ export function renderDescription(description: string) { * If an object has the key 'title' it will have priority, followed by the key 'name'. * If 'title' nor 'name' is found, a required item will be considered. * Otherwise the first occurrence of a nonempty string is chosen. - * @param {*} data the data to find the title for - * @param {*} fieldSchema schema for the item - * @param {*} formSchema schema for the form - * @returns {string} describing title of the data + * @param data - the data to find the title for + * @param fieldSchema - schema for the item + * @param formSchema - schema for the form + * @returns describing title of the data */ export function findTitle(data: any, fieldSchema: any, formSchema: any) { if (!data) { diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx index 92c5951dfb..75bbb513a1 100644 --- a/src/components/icon/icon.tsx +++ b/src/components/icon/icon.tsx @@ -13,8 +13,8 @@ import { IconSize } from '../../interface'; * standard sizes defined that can be used with the `size` property. * * ### Setup - * To use **@lundalogik/lime-icons8**, the `/assets` folder from - * __@lundalogik/lime-icons8__ must be made available on the webserver. + * To use `@lundalogik/lime-icons8`, the `/assets` folder from + * `@lundalogik/lime-icons8` must be made available on the webserver. * To use a different icon set, the icons must be placed in a folder structure * that looks like this: `assets/icons/.svg` * @@ -36,7 +36,7 @@ import { IconSize } from '../../interface'; * ``` * * ### Lime icons - * There are icons included in the **@lundalogik/lime-icons8** package which are + * There are icons included in the `@lundalogik/lime-icons8` package which are * designed by our designers at Lime. * The names of these icons start with `-lime-`, which makes them easy to * find using the Icon Finder tool below. @@ -104,8 +104,8 @@ export class Icon { /** * Load the SVG data for the icon from the icon cache - * @param {string} name name of the icon - * @returns {string} the icon SVG data + * @param name - name of the icon + * @returns the icon SVG data */ private loadSvg(name: string) { return iconCache.get(name, config.iconPath); diff --git a/src/components/input-field/input-field.tsx b/src/components/input-field/input-field.tsx index 1be0b23e84..471c9a3504 100644 --- a/src/components/input-field/input-field.tsx +++ b/src/components/input-field/input-field.tsx @@ -734,8 +734,8 @@ export class InputField { /** * Key handler for the input field * Will change focus to the first/last item in the dropdown list to enable selection with the keyboard - * @param {KeyboardEvent} event event - * @returns {void} + * @param event - event + */ private onKeyDown = (event: KeyboardEvent): void => { diff --git a/src/components/list/list-renderer.tsx b/src/components/list/list-renderer.tsx index c1140ee1b9..c8ddff3c9c 100644 --- a/src/components/list/list-renderer.tsx +++ b/src/components/list/list-renderer.tsx @@ -75,8 +75,8 @@ export class ListRenderer { * and return the index at which that ListItem is located in `items`. * Returns `undefined` if no item should have the attribute set. * See https://github.com/material-components/material-components-web/tree/e66a43a75fef4f9179e24856649518e15e279a04/packages/mdc-list#accessibility - * @param {Array} items the items of the list, including any `ListSeparator`:s - * @returns {number} the index as per the description + * @param items - the items of the list, including any `ListSeparator`:s + * @returns the index as per the description */ private getIndexForWhichToApplyTabIndex = ( items: Array @@ -105,9 +105,9 @@ export class ListRenderer { /** * Render a single list item - * @param {ListItem | ListSeparator} item the item to render - * @param {number} index the index the item had in the `items` array - * @returns {HTMLElement} the list item + * @param item - the item to render + * @param index - the index the item had in the `items` array + * @returns the list item */ private renderListItem = ( item: ListItem | ListSeparator, @@ -178,8 +178,8 @@ export class ListRenderer { /** * Render the text of the list item - * @param {ListItem} item the list item - * @returns {HTMLElement | string} the text for the list item + * @param item - the list item + * @returns the text for the list item */ private renderText = (item: ListItem) => { if (this.isSimpleItem(item)) { @@ -208,9 +208,9 @@ export class ListRenderer { /** * Render an icon for a list item - * @param {ListRendererConfig} config the config object, passed on from the `renderListItem` function - * @param {ListItem} item the list item - * @returns {HTMLElement} the icon element + * @param config - the config object, passed on from the `renderListItem` function + * @param item - the list item + * @returns the icon element */ private renderIcon = (config: ListRendererConfig, item: ListItem) => { const style: any = {}; diff --git a/src/components/markdown/markdown-parser.ts b/src/components/markdown/markdown-parser.ts index 7f3825b0a4..55b117ae29 100644 --- a/src/components/markdown/markdown-parser.ts +++ b/src/components/markdown/markdown-parser.ts @@ -16,9 +16,9 @@ import rehypeRaw from 'rehype-raw'; * * If the text already is in HTML it will be sanitized and * "dangerous" tags such as