Skip to content

Commit

Permalink
remove unwanted comments
Browse files Browse the repository at this point in the history
  • Loading branch information
e11sy committed Oct 4, 2024
1 parent c3060e0 commit a9964f9
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 18 deletions.
8 changes: 3 additions & 5 deletions src/ListRenderer/ChecklistRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class CheckListRenderer implements ListRendererInterface<ChecklistItemMet
/**
* Return the item content
* @param item - item wrapper (<li>)
* @returns
* @returns - item content string
*/
getItemContent(item: Element): string {
const contentNode = item.querySelector(`.${CheckListRenderer.CSS.itemContent}`);
Expand Down Expand Up @@ -148,8 +148,7 @@ export class CheckListRenderer implements ListRendererInterface<ChecklistItemMet

/**
* Toggle checklist item state
* @param checkbox
* @returns
* @param checkbox - checkbox element to be toggled
*/
private toggleCheckbox(checkbox: Element): void {
checkbox.classList.toggle(CheckListRenderer.CSS.itemChecked);
Expand All @@ -160,9 +159,8 @@ export class CheckListRenderer implements ListRendererInterface<ChecklistItemMet
/**
* Removes class responsible for special hover behavior on an item
* @param el - item wrapper
* @returns
*/
private removeSpecialHoverBehavior(el: Element) {
private removeSpecialHoverBehavior(el: Element): void {
el.classList.remove(CheckListRenderer.CSS.noHover);
}
}
2 changes: 1 addition & 1 deletion src/ListRenderer/OrderedListRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class OrderedListRenderer implements ListRendererInterface<OrderedListIte
/**
* Return the item content
* @param item - item wrapper (<li>)
* @returns
* @returns - item content string
*/
getItemContent(item: Element): string {
const contentNode = item.querySelector(`.${OrderedListRenderer.CSS.itemContent}`);
Expand Down
2 changes: 1 addition & 1 deletion src/ListRenderer/UnorderedListRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class UnorderedListRenderer implements ListRendererInterface<UnorderedLis
/**
* Return the item content
* @param item - item wrapper (<li>)
* @returns
* @returns - item content string
*/
getItemContent(item: Element): string {
const contentNode = item.querySelector(`.${UnorderedListRenderer.CSS.itemContent}`);
Expand Down
3 changes: 0 additions & 3 deletions src/ListTabulator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ export default class ListTabulator<Renderer extends ListRenderer> {
/**
* The method for recursive collecting of the child items
* @param parent - where to find items
* @returns
*/
const getItems = (parent: ItemChildWrapperElement): ListItem[] => {
const children = getChildItems(parent);
Expand Down Expand Up @@ -327,7 +326,6 @@ export default class ListTabulator<Renderer extends ListRenderer> {
/**
* Handle UL, OL and LI tags paste and returns List data
* @param element - html element that contains whole list
* @returns
*/
pasteHandler(element: PasteEvent['detail']['data']): ListData {
const { tagName: tag } = element;
Expand Down Expand Up @@ -381,7 +379,6 @@ export default class ListTabulator<Renderer extends ListRenderer> {
/**
* Handles Enter keypress
* @param event - keydown
* @returns
*/
enterPressed(event: KeyboardEvent): void {
const currentItem = this.currentItem;
Expand Down
4 changes: 0 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ export type ListParams = BlockToolConstructorOptions<ListData, NestedListConfig>
export default class NestedList {
/**
* Notify core that read-only mode is supported
* @returns
*/
static get isReadOnlySupported(): boolean {
return true;
}

/**
* Allow to use native Enter behaviour
* @returns
*/
static get enableLineBreaks(): boolean {
return true;
Expand All @@ -43,7 +41,6 @@ export default class NestedList {
* Get Tool toolbox settings
* icon - Tool icon's SVG
* title - title to show in toolbox
* @returns
*/
static get toolbox(): ToolboxConfig {
return {
Expand All @@ -54,7 +51,6 @@ export default class NestedList {

/**
* Get list style name
* @returns
*/
get listStyle(): ListDataStyle {
return this.data.style || this.defaultListStyle;
Expand Down
1 change: 0 additions & 1 deletion src/utils/focusItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { getItemContentElement } from './getItemContentElement';
* Sets focus to the item's content
* @param item - item (<li>) to select
* @param atStart - where to set focus: at the start or at the end
* @returns
*/
export function focusItem(item: ItemElement, atStart: boolean = true): void {
const itemContent = getItemContentElement(item);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/isLastItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ItemElement } from '../types/Elements';

/**
* Check that passed item element is last item of the list
* @param item
* @param item - item to be checked, wherever it has next element sibling
*/
export function isLastItem(item: ItemElement): boolean {
return item.nextElementSibling === null;
Expand Down
3 changes: 1 addition & 2 deletions src/utils/type-guards.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* Type guard to check if a node is an HTMLElement, then we can safely use it as an HTMLElement
* @param node
* @returns
* @param node - Node to be checked, wherever it is an HTMLElement
*/
export function isHtmlElement(node: Node): node is HTMLElement {
// node is an HTMLElement if it is an element node
Expand Down

0 comments on commit a9964f9

Please sign in to comment.