{"id":25924926,"url":"https://github.com/gah-code/leetcode-practice","last_synced_at":"2026-05-14T05:39:16.251Z","repository":{"id":277497362,"uuid":"932609913","full_name":"gah-code/leetcode-practice","owner":"gah-code","description":"A structured JavaScript workout environment for solving LeetCode problems efficiently with ESLint, Jest, and Quokka.js.","archived":false,"fork":false,"pushed_at":"2025-02-18T05:39:50.000Z","size":12486,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T18:44:52.526Z","etag":null,"topics":["exercises","javascript","jest","leetcode"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gah-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-14T07:40:19.000Z","updated_at":"2025-02-18T05:39:54.000Z","dependencies_parsed_at":"2025-02-14T08:32:19.906Z","dependency_job_id":"0f3626f3-4df0-4457-886c-033658a7264c","html_url":"https://github.com/gah-code/leetcode-practice","commit_stats":null,"previous_names":["gah-code/leetcode-practice"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gah-code/leetcode-practice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fleetcode-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fleetcode-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fleetcode-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fleetcode-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gah-code","download_url":"https://codeload.github.com/gah-code/leetcode-practice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fleetcode-practice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33012760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exercises","javascript","jest","leetcode"],"created_at":"2025-03-03T18:33:12.300Z","updated_at":"2026-05-14T05:39:16.234Z","avatar_url":"https://github.com/gah-code.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🚀 LeetCode JavaScript Practice\n\nA structured JavaScript practice environment for solving **LeetCode problems** efficiently with **ESLint, Jest, and Quokka.js**.\n\n## 📌 Project Overview\n\nThis project is designed to **streamline problem-solving in JavaScript** by integrating:\n\n- **ESLint** for code quality and best practices.\n- **Jest** for testing solutions automatically.\n- **Quokka.js** for real-time execution and debugging.\n- **Automated script** for quickly creating new problems.\n\n---\n\n## 🛠️ Project Setup\n\n### 1️⃣ **Clone the Repository**\n\n```sh\ngit clone https://github.com/gah-code/leetcode-practice.git\ncd leetcode-practice\n```\n\n### 2️⃣ **Install Dependencies**\n\n```sh\nnpm install\n```\n\n### 3️⃣ **Setup ESLint for Linting**\n\n```sh\nnpx eslint --init\n```\n\n🔹 **Custom ESLint Config** (`eslint.config.mjs`) is already set up to support Jest and Quokka.js.\n\n---\n\n## 🧪 Testing with Jest\n\nRun all tests:\n\n```sh\nnpm test\n```\n\nRun tests for a specific file:\n\n```sh\nnpm test problems/fetch-with-retry.test.js\n```\n\n---\n\n## ⚡ Using Quokka.js for Live Debugging\n\n### **Installation**\n\n1. Open **VS Code**.\n2. Press **Cmd + Shift + X** (Mac) or **Ctrl + Shift + X** (Windows/Linux).\n3. Search for **\"Quokka.js\"** and install the extension.\n\n### **Quokka.js Commands**\n\n| Command | Description |\n|---------|-------------|\n| `Cmd + Shift + P` → \"Quokka.js: Start on Current File\" | Runs Quokka in the open file |\n| `Cmd + Shift + P` → \"Quokka.js: Start on Current Project\" | Runs Quokka for all configured files |\n| `Cmd + K Q` | Stops Quokka |\n| `Cmd + Shift + P` → \"Quokka.js: Toggle Value Display\" | Shows inline execution results |\n\n---\n\n## 📂 Folder Structure\n\n```\nleetcode-practice/\n│── .quokka/                  # Quokka.js config\n│── problems/                 # LeetCode problems\n│   ├── fetch-with-retry.js   # Example problem solution\n│   ├── fetch-with-retry.test.js  # Jest test for the problem\n│── eslint.config.mjs         # ESLint flat config setup\n│── package.json              # Project dependencies\n│── problem-template.js       # Template for new problems\n│── new-problem.sh            # Automation script for creating new problems\n│── README.md                 # Project documentation\n```\n\n---\n\n## 🚀 Workflow: How to Add a New Problem\n\n1️⃣ **Create a New Problem File**  \nRun the following script:\n\n```sh\n./new-problem.sh fetch-with-retry\n```\n\nThis will:\n\n- Create a new problem file inside `problems/`\n- Pre-fill the file with the standard **problem template**\n- Open it automatically in **VS Code**\n\n2️⃣ **Implement the Solution**\n\n- Write the function inside the newly created `.js` file.\n- Use **Quokka.js** for real-time debugging.\n\n3️⃣ **Write Tests**\n\n- Create a test file in `problems/` (if not generated automatically).\n- Use **Jest** to write test cases.\n\n4️⃣ **Run Tests**\n\n```sh\nnpm test\n```\n\n- Verify the solution with Jest before submitting.\n\n---\n\n## ✅ To-Do List \u0026 Future Enhancements V 1.1.0\n\n- [ ] **Auto-generate Jest test files** when creating new problems.\n- [ ] **Integrate Prettier** for automatic code formatting.\n- [ ] **Improve error handling** for the `new-problem.sh` script.\n\n---\n\n## ✅ To-Do List \u0026 Future Enhancements V 1.2.0\n\n- [ ] **Add TypeScript support** for stronger typing in solutions.\n- [ ] **Implement GitHub Actions** for continuous integration.\n- [ ] **Create a VS Code snippet extension** for inserting the problem template easily.\n\n---\n\n## 📝 Recommendations for Best Learning Experience\n\n✅ **Follow a structured approach:** Start with an easy problem, read the description carefully, implement, and test.  \n✅ **Use Quokka.js:** Debug functions before running full Jest tests.  \n✅ **Write detailed solution approaches:** Add comments to document thought processes.  \n✅ **Refactor frequently:** Aim for clean, efficient, and readable code.  \n✅ **Keep the repo organized:** Each problem should have a corresponding test file.  \n\n---\n\n## 💡 Have Suggestions?\n\nFeel free to **contribute** or open an **issue** if you’d like to see additional features! 🚀  \n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgah-code%2Fleetcode-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgah-code%2Fleetcode-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgah-code%2Fleetcode-practice/lists"}