From f4b7afb1e9555db480c248a4e857f0288299db17 Mon Sep 17 00:00:00 2001 From: IT-WIBRC Date: Fri, 15 Aug 2025 05:35:52 +0100 Subject: [PATCH 1/2] fix(hooks): Fix husky hooks --- .husky/commit-msg | 2 -- .husky/pre-commit | 2 -- 2 files changed, 4 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index fc2e846..2cbf881 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,3 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" npx commitlint --edit "\$1" diff --git a/.husky/pre-commit b/.husky/pre-commit index f654052..2312dc5 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" npx lint-staged From 01d11d4e63bdf2444ce88426858df8584010e828 Mon Sep 17 00:00:00 2001 From: IT-WIBRC Date: Sat, 16 Aug 2025 21:30:21 +0100 Subject: [PATCH 2/2] fix(husky): fix husky hooks --- .husky/_/commit-msg | 1 + .husky/{ => _}/pre-commit | 0 .husky/commit-msg | 1 - TODO.md | 41 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100755 .husky/_/commit-msg rename .husky/{ => _}/pre-commit (100%) delete mode 100755 .husky/commit-msg create mode 100644 TODO.md diff --git a/.husky/_/commit-msg b/.husky/_/commit-msg new file mode 100755 index 0000000..70bd3dd --- /dev/null +++ b/.husky/_/commit-msg @@ -0,0 +1 @@ +npx --no-install commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/_/pre-commit similarity index 100% rename from .husky/pre-commit rename to .husky/_/pre-commit diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index 2cbf881..0000000 --- a/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -npx commitlint --edit "\$1" diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..bc21df2 --- /dev/null +++ b/TODO.md @@ -0,0 +1,41 @@ +# TODO + +## Why? + +- [ ] Why is the timeout in requests important? +- [ ] Why is it important to cancel a request? +- [ ] Why is it important to learn C for every programmer or developer? +- [ ] Why never use Linux as admin but as a User with the same apps as the admin? + +## Problem-Solving + +- [x] Resolve husky problem on pre-commit (Understand why and document it for future usage) +- [ ] Check if there is any connectivity before doing a request. Do it globally before any request (Can use `navigator.online` for example or a more appropriate solution) +- [ ] Look for a way to avoid getting the same request when we go back to a page. + +## Architecture & Principles + +- [ ] Single responsibility principle +- [ ] To avoid coupling with tools you are using, create a separated layer to contain it, making it easy to switch from one tool to another without affecting the other layers. (Use context name instead of tool name) +- [ ] Content Security Policy (CSP): Websites can implement CSPs to tell your browser exactly which external resources (scripts, stylesheets, images, etc.) are allowed to be loaded on their page. (Implementation Front and Back) +- [ ] How to create your own simple toast instead of using a library +- [ ] How to structure your own Modal using (``) or creating your own with a common structure mimicking the native one +- [ ] Composable to detect an outside click +- [ ] Learn reusable workflow with GitHub and signed commits + +## Code & Best Practices + +- [ ] `eslint-plugin-jsx-a11y` (Test using screen readers like NVDA or VoiceOver) — SEO +- [ ] `input` autocomplete property +- [ ] Don't use the `.d.ts` file for handwriting types inside your file for projects that are not a library as it can be harmful, use a normal `.ts` file instead (recommendation from the TS team). To enforce it, use `skipLibCheck` set to `true`. +- [ ] Always search for repeating code (title, description, button, etc.) and create a component to reuse. +- [ ] Look into `vite-tsconfig-paths`. + +## Tools & Concepts + +- [ ] Map and Set for `select` and `select multiple` and more, and learn how to effectively use them as well as `WeakMap`, `WeakSet`, `Array`, and `Object`. +- [ ] Commons stubs I used to use (`i18n`, partial module, module mock, spy on window property, etc.) + +## Soft Skills + +- [ ] Skills needed (communication, awkward communication, critical thinking, good decision making, goal and organization)