Skip to content

Do I follow JavaScript best practices? #5

@musangamfure

Description

@musangamfure

According to JavaScript Best Practices, DRY, KISS, YAGNI, and HTML & CSS:

Here are some issues related to JavaScript best practices:

  • The code has a mix of arrow functions and traditional functions. It is recommended to be consistent with the use of arrow functions throughout the code.
  • Redundant code: The saveTodoItems() function is called twice in the addTodo() function.
  • Unused imported module: The checkboxCheck module is imported but not used anywhere in the code
  • Code repetition: The toggleDeleteIcon function is defined twice in the code, once as an imported module and once within the same file.
  • Large functions: Some functions, such as displayTodoItems() and addTodo(), are quite large and could be refactored into smaller, more modular functions

Here are the issues related to HTML and CSS best practices:

  • Lack of semantic HTML: The code uses div and li elements without any semantic meaning, which can make the code harder to understand and maintain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions