souad988 / ToDoList

this project is a web application where users can add new tasks to their todolist, mark a task as done, update it or remove it, and can also clear all completed tasks in one click , this project is built using html/css and javascript.
https://souad988.github.io/ToDoList
3 stars 0 forks source link

Issues related to best practices or clean code rules #7

Open souad988 opened 2 years ago

souad988 commented 2 years ago

issues related to HTML and CSS best practices: https://github.com/souad988/ToDoList/blob/38358218feffe0cceae2fa8d21c4ed1225c0f01d/src/index.html#L11 in this line it would be better if i use sementic tag like section fo this exemple. https://github.com/souad988/ToDoList/blob/38358218feffe0cceae2fa8d21c4ed1225c0f01d/src/index.html#L20 in this line button tag is better rather than clickable div tag

issues related to DRY, KISS, and YAGNI rules : https://github.com/souad988/ToDoList/blob/38358218feffe0cceae2fa8d21c4ed1225c0f01d/src/index.js#L17 in this function i'm violating the DRY rule by adding and removing hide and show class names repeatedly while i can create a function for this task.

https://github.com/souad988/ToDoList/blob/38358218feffe0cceae2fa8d21c4ed1225c0f01d/src/index.js#L53 in this function i'm violating the KISS rule since this fonction is doing lot of task it would be better if i put every task in a seperate function for code re-usability and to be easy to read .