From 0e8e466f93693c8bdd146a964743465dac48b597 Mon Sep 17 00:00:00 2001 From: Subhangi Choudhary Date: Sat, 29 May 2021 22:59:43 +0530 Subject: [PATCH 1/2] added Inline JS support to ESlint --- .eslintrc.json | 30 ++++++++++++++++++++++++++++++ .htmlhintrc | 12 ++++++++++++ DSA.html | 3 ++- README.md | 4 ++++ booklist.html | 5 +++-- ide.html | 3 ++- js/index.js | 18 +++++++++--------- js/typing.js | 2 +- 8 files changed, 63 insertions(+), 14 deletions(-) create mode 100644 .eslintrc.json create mode 100644 .htmlhintrc diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..569bf93 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,30 @@ +{ + "env": { + "browser": true, + "es6": true, + "jquery": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 2018 + }, + "ignorePatterns": ["lib/*","tilt.jquery.js"], + "rules": { + "indent": [ + "error", + 4 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "always" + ] + } +} \ No newline at end of file diff --git a/.htmlhintrc b/.htmlhintrc new file mode 100644 index 0000000..fc02413 --- /dev/null +++ b/.htmlhintrc @@ -0,0 +1,12 @@ +{ + "tagname-lowercase": true, + "attr-lowercase": true, + "attr-value-double-quotes": true, + "doctype-first": true, + "tag-pair": true, + "spec-char-escape": true, + "id-unique": true, + "src-not-empty": true, + "attr-no-duplication": true, + "title-require": true +} \ No newline at end of file diff --git a/DSA.html b/DSA.html index 07ebd6f..beb5d25 100644 --- a/DSA.html +++ b/DSA.html @@ -87,6 +87,7 @@ + @@ -163,7 +164,7 @@
Features< Code Editor
Quizzes
DSA Guidance
- Opportunities
+
Opportunities
Project Ideas
RoadMap to your DSA
DSA Problems
diff --git a/README.md b/README.md index 20eb04e..53f7faf 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,9 @@ - Bootstrap - Javascript +## Steps to add Inline JS Support to ESlint +go to vscode > extensions > install HTMLHint + ## Contribution Guidelines ⚙️ * Make sure you do not copy codes from external sources because that work will not be considered. Plagiarism is strictly not allowed. @@ -64,3 +67,4 @@ This project follows the [MIT License](https://choosealicense.com/licenses/mit/) [![forthebadge](https://forthebadge.com/images/badges/uses-html.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/uses-css.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com) + diff --git a/booklist.html b/booklist.html index a3bc561..460b1be 100644 --- a/booklist.html +++ b/booklist.html @@ -31,9 +31,9 @@ - !-- header starts --> +
- @@ -182,7 +183,7 @@
Features< DSA Guidance
Opportunities
+ target="_blank">Opportunities

Project Ideas
diff --git a/js/index.js b/js/index.js index 6213f6c..d1d166c 100644 --- a/js/index.js +++ b/js/index.js @@ -18,15 +18,15 @@ backToTopButton.addEventListener("click", () => { $("#faqaccordion").on("hide.bs.collapse show.bs.collapse", e => { $(e.target) - .prev() - .find("i:last-child") - .toggleClass("fa-minus fa-plus"); - }); + .prev() + .find("i:last-child") + .toggleClass("fa-minus fa-plus"); +}); //close navbar when clicked on link -const navLinks = document.querySelectorAll('.nav-item') -const menuToggle = document.getElementById('navbarSupportedContent') -const bsCollapse = new bootstrap.Collapse(menuToggle) +const navLinks = document.querySelectorAll(".nav-item"); +const menuToggle = document.getElementById("navbarSupportedContent"); +const bsCollapse = new bootstrap.Collapse(menuToggle); // eslint-disable-line navLinks.forEach((l) => { - l.addEventListener('click', () => { bsCollapse.toggle() }) -}) + l.addEventListener("click", () => { bsCollapse.toggle(); }); +}); diff --git a/js/typing.js b/js/typing.js index f995a21..c989c4d 100644 --- a/js/typing.js +++ b/js/typing.js @@ -17,6 +17,6 @@ function typingEffect(){ count = 0; document.querySelector("#typed-text").innerHTML = ""; typingEffect(); - },2000) + },2000); } } \ No newline at end of file From 862dc0a2da0212f1f1f0a61cc3c350b9a318a21d Mon Sep 17 00:00:00 2001 From: Subhangi Choudhary Date: Fri, 4 Jun 2021 20:06:54 +0530 Subject: [PATCH 2/2] done all changes --- .eslintrc.json | 4 ++-- DSA.html | 2 +- README.md | 3 --- booklist.html | 2 +- ide.html | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 569bf93..5dcc026 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,7 +11,7 @@ "ignorePatterns": ["lib/*","tilt.jquery.js"], "rules": { "indent": [ - "error", + "warn", 4 ], "linebreak-style": [ @@ -19,7 +19,7 @@ "unix" ], "quotes": [ - "error", + "warn", "double" ], "semi": [ diff --git a/DSA.html b/DSA.html index beb5d25..67fd6ff 100644 --- a/DSA.html +++ b/DSA.html @@ -84,10 +84,10 @@ DSA Problems + - diff --git a/README.md b/README.md index 53f7faf..8b74a6b 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,6 @@ - Bootstrap - Javascript -## Steps to add Inline JS Support to ESlint -go to vscode > extensions > install HTMLHint - ## Contribution Guidelines ⚙️ * Make sure you do not copy codes from external sources because that work will not be considered. Plagiarism is strictly not allowed. diff --git a/booklist.html b/booklist.html index 460b1be..72b8951 100644 --- a/booklist.html +++ b/booklist.html @@ -70,11 +70,11 @@ DSA Problems Suggested Books + - diff --git a/ide.html b/ide.html index be5b905..709e3d7 100644 --- a/ide.html +++ b/ide.html @@ -82,12 +82,11 @@ to Project DSA Problems - + -