From 5879c12a5c7cb1be6d4e428930d3331623cc2649 Mon Sep 17 00:00:00 2001 From: mor10 Date: Mon, 19 Oct 2020 13:40:59 -0700 Subject: [PATCH] Update files with current data --- .eslintrc.js | 15 ++++ .vscode/settings.json | 4 ++ 03_15/Book.js | 51 +++++++------- 03_15/script.js | 4 +- 07_05/script.js | 38 ++++++---- 08_16/script.js | 1 - 08_17/script.js | 15 +++- 09_07/script-advanced.js | 51 +++++++------- 09_07/script-intermediate.js | 61 ++++++++-------- 09_08/script.js | 79 +++++++++++---------- 10_01/components/Backpack.js | 45 ++++++++++++ 10_01/components/data.js | 36 ++++++++++ 10_01/index.html | 45 ++++++++++++ 10_01/script.js | 131 +++++++++++++++++++++++++++++++++++ {01_01 => 10_02}/Photo.js | 0 package-lock.json | 43 ++++++------ package.json | 4 +- 17 files changed, 460 insertions(+), 163 deletions(-) create mode 100644 .eslintrc.js create mode 100644 .vscode/settings.json create mode 100644 10_01/components/Backpack.js create mode 100644 10_01/components/data.js create mode 100644 10_01/index.html create mode 100644 10_01/script.js rename {01_01 => 10_02}/Photo.js (100%) mode change 100755 => 100644 diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..b9a064fe --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,15 @@ +module.exports = { + "env": { + "browser": true, + "es2021": true + }, + "extends": [ + "standard" + ], + "parserOptions": { + "ecmaVersion": 12, + "sourceType": "module" + }, + "rules": { + } +}; diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..89d1965f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" +} \ No newline at end of file diff --git a/03_15/Book.js b/03_15/Book.js index 32354243..13c4b0cb 100644 --- a/03_15/Book.js +++ b/03_15/Book.js @@ -1,28 +1,27 @@ class Book { - constructor( - title, - author, - ISBN, - pubYear, - pageNumber, - currentPage, - readStatus, - ) { - this.title = title; - this.author = author; - this.ISBN = ISBN; - this.pubYear = pubYear; - this.pageNumber = pageNumber; - this.currentPage = currentPage; - this.readStatus = readStatus; - } - updateCurrentPage(newCurrentPage) { - this.currentPage = newCurrentPage; - } - updateReadStatus(newReadStatus) { - this.readStatus= newReadStatus; - } + constructor( + title, + author, + ISBN, + pubYear, + pageNumber, + currentPage, + readStatus + ) { + this.title = title; + this.author = author; + this.ISBN = ISBN; + this.pubYear = pubYear; + this.pageNumber = pageNumber; + this.currentPage = currentPage; + this.readStatus = readStatus; } - - export default Book; - \ No newline at end of file + updateCurrentPage(newCurrentPage) { + this.currentPage = newCurrentPage; + } + updateReadStatus(newReadStatus) { + this.readStatus = newReadStatus; + } +} + +export default Book; diff --git a/03_15/script.js b/03_15/script.js index 3c1e8920..5ca8de0e 100755 --- a/03_15/script.js +++ b/03_15/script.js @@ -33,7 +33,7 @@ const surveillanceCapitalism = new Book( 691, "Finished" ); -console.log(surveillanceCapitalism) +console.log(surveillanceCapitalism); const consciousCreative = new Book( "The Conscious Creative", @@ -44,7 +44,7 @@ const consciousCreative = new Book( 216, "Finished" ); -console.log(consciousCreative) +console.log(consciousCreative); const techVirtues = new Book( "Technology and the Virtues", diff --git a/07_05/script.js b/07_05/script.js index 743a7803..0bb1c230 100755 --- a/07_05/script.js +++ b/07_05/script.js @@ -2,38 +2,46 @@ * Solution: Build and modify an array * - Build an array with 8 items * - Remove the last item - * - Add the last item as the first item on the array + * - Add the last item as the first item on the array * - Sort the items by alphabetical order * - Use the find() method to find a specific item in the array * - Remove the item you found using the find method from the array. */ -const deskArray = ["pen", "camera", "phone", "notebook", "headphones", "lightbulb", "USB drive"] -console.log("Original array:", deskArray) +const deskArray = [ + "pen", + "camera", + "phone", + "notebook", + "headphones", + "lightbulb", + "usb drive", +]; +console.log("Original array:", deskArray); // Remove the last item: // @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop -// deskArray.pop() -// console.log("New array:", deskArray) +// deskArray.pop(); +// console.log("New array:", deskArray); -// Add last item as the firs item on the array: +// Add last item as the first item on the array: // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift -// deskArray.unshift(deskArray.pop()) -// console.log("Last item is now first:", deskArray) +// deskArray.unshift(deskArray.pop()); +// console.log("Last item is now first:", deskArray); // Sort items by alphabetical order: // @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort -// deskArray.sort() -// console.log("Sorted array:", deskArray) +// deskArray.sort(); +// console.log("Sorted array:", deskArray); // Find "notebook": // @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find -// const foundItem = deskArray.find(item => item === "notebook"); -// console.log("Found item:", foundItem) +// const foundItem = deskArray.find((item) => item === "notebook"); +// console.log("Found item:", foundItem); // Find and remove an item: // @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice // @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf -// let remove = "notebook" -// deskArray.splice(deskArray.indexOf(remove), 1) -// console.log(`Array with "${remove}" removed:`, deskArray) \ No newline at end of file +// let remove = "notebook"; +// deskArray.splice(deskArray.indexOf(remove), 1); +// console.log(`Array with "${remove}" removed:`, deskArray); diff --git a/08_16/script.js b/08_16/script.js index 3b166464..e5bbe43d 100755 --- a/08_16/script.js +++ b/08_16/script.js @@ -21,7 +21,6 @@ const everydayPack = new Backpack( ); const content = ` -
diff --git a/08_17/script.js b/08_17/script.js index 298740cf..13b48c35 100755 --- a/08_17/script.js +++ b/08_17/script.js @@ -7,13 +7,18 @@ */ import backpackObjectArray from "./components/data.js"; -const main = document.querySelector(".maincontent"); - +// Map throught the array and make a new array const content = backpackObjectArray.map((backpack) => { + // "backpack" now holds a single backpack object + + // Create new article let backpackArticle = document.createElement("article"); backpackArticle.classList.add("backpack"); + + // Set article ID to the backpack.id property backpackArticle.setAttribute("id", backpack.id); + // Set the innerHTML of backpackArticle using the backpack object. backpackArticle.innerHTML = `
@@ -41,9 +46,15 @@ const content = backpackObjectArray.map((backpack) => { } `; + + // Return the backpackArticle to the content array. return backpackArticle; }); +// Get the main +const main = document.querySelector(".maincontent"); + +// Loop through the content array to append each backpack article. content.forEach((backpack) => { main.append(backpack); }); diff --git a/09_07/script-advanced.js b/09_07/script-advanced.js index f2415652..e717033a 100755 --- a/09_07/script-advanced.js +++ b/09_07/script-advanced.js @@ -1,9 +1,11 @@ /** * Challenge: Create an event listener - * - Find each element with the .backpack__strap class - * - Create function to iterate through above elements - * - Use the data-side attribute to identify what strap you are working on - * - Create form with a number input and a submit button + * - Find the two elements with the .backpack__strap class. + * - Create a function to output the strap length form. + * - Iterate through each item with the .backpack__strap class. + * - Capture the value of the data-side attribute to indicate the strap side. + * - Create a form element. + * - Populate the form with an input and a submit button. * - Add event listener to each of the strap length forms. * - Update strap length value with value submitted from form. */ @@ -13,31 +15,32 @@ import backpackObjectArray from "./components/data.js"; * Add event listener to the lid-toggle button. */ const lidToggle = function (event, button, newArg) { - console.log(event) - console.log(newArg) - + console.log(event); + console.log(newArg); + // Find the current backpack object in backpackObjectArray - let backpackObject = backpackObjectArray.find( ({ id }) => id === button.parentElement.id ); - + let backpackObject = backpackObjectArray.find( + ({ id }) => id === button.parentElement.id + ); + // Toggle lidOpen status - backpackObject.lidOpen == true - ? backpackObject.lidOpen = false - : backpackObject.lidOpen = true; + backpackObject.lidOpen == true + ? (backpackObject.lidOpen = false) + : (backpackObject.lidOpen = true); // Toggle button text - button.innerText == "Open lid" - ? button.innerText = "Close lid" - : button.innerText = "Open lid"; + button.innerText == "Open lid" + ? (button.innerText = "Close lid") + : (button.innerText = "Open lid"); // Set visible property status text let status = button.parentElement.querySelector(".backpack__lid span"); status.innerText == "closed" ? (status.innerText = "open") : (status.innerText = "closed"); -} +}; const backpackList = backpackObjectArray.map((backpack) => { - let backpackArticle = document.createElement("article"); backpackArticle.classList.add("backpack"); backpackArticle.setAttribute("id", backpack.id); @@ -58,10 +61,10 @@ const backpackList = backpackObjectArray.map((backpack) => {
  • Number of pockets: ${ backpack.pocketNum }
  • -
  • Left strap length: ${ +
  • Left strap length: ${ backpack.strapLength.left } inches
  • -
  • Right strap length: ${ +
  • Right strap length: ${ backpack.strapLength.right } inches
  • Lid status: ${ @@ -70,14 +73,14 @@ const backpackList = backpackObjectArray.map((backpack) => { `; - + let button = backpackArticle.querySelector(".lid-toggle"); - let newArg = "The argument I want to pass to the callback function!" + let newArg = "The argument I want to pass to the callback function!"; // Add event listener button.addEventListener("click", (event) => { - lidToggle(event, button, newArg) - }) + lidToggle(event, button, newArg); + }); return backpackArticle; }); @@ -88,5 +91,3 @@ const main = document.querySelector(".maincontent"); backpackList.forEach((backpack) => { main.append(backpack); }); - - diff --git a/09_07/script-intermediate.js b/09_07/script-intermediate.js index 38eceace..468b1f38 100755 --- a/09_07/script-intermediate.js +++ b/09_07/script-intermediate.js @@ -1,6 +1,6 @@ /** - * Solution: Create an event listener - * - Add event listeners to each of the strap length forms. + * Challenge: Create an event listener + * - Add event listener to each of the strap length forms. * - Update strap length value with value submitted from form. */ import backpackObjectArray from "./components/data.js"; @@ -9,43 +9,43 @@ import backpackObjectArray from "./components/data.js"; * Add event listener to the lid-toggle button. */ const lidToggle = function (event, button, newArg) { - console.log(event) - console.log(newArg) - + console.log(event); + console.log(newArg); + // Find the current backpack object in backpackObjectArray - let backpackObject = backpackObjectArray.find( ({ id }) => id === button.parentElement.id ); - + let backpackObject = backpackObjectArray.find( + ({ id }) => id === button.parentElement.id + ); + // Toggle lidOpen status - backpackObject.lidOpen == true - ? backpackObject.lidOpen = false - : backpackObject.lidOpen = true; + backpackObject.lidOpen == true + ? (backpackObject.lidOpen = false) + : (backpackObject.lidOpen = true); // Toggle button text - button.innerText == "Open lid" - ? button.innerText = "Close lid" - : button.innerText = "Open lid"; + button.innerText == "Open lid" + ? (button.innerText = "Close lid") + : (button.innerText = "Open lid"); // Set visible property status text let status = button.parentElement.querySelector(".backpack__lid span"); status.innerText == "closed" ? (status.innerText = "open") : (status.innerText = "closed"); -} +}; /** * Strap length functionality */ const newStrapLength = (strapArray) => { - // Loop through each element on the list - strapArray.forEach( listElement => { - + strapArray.forEach((listElement) => { // Get what side we are working with - let side = listElement.getAttribute("data-side") + let side = listElement.getAttribute("data-side"); // Create a new form element - const lengthForm = document.createElement("form") - lengthForm.classList.add(`${side}length`) + const lengthForm = document.createElement("form"); + lengthForm.classList.add(`${side}length`); // Populate form with an input and a button lengthForm.innerHTML = ` @@ -54,12 +54,11 @@ const newStrapLength = (strapArray) => { `; // Add form to the end of the list element - listElement.append(lengthForm) - }) -} + listElement.append(lengthForm); + }); +}; const backpackList = backpackObjectArray.map((backpack) => { - let backpackArticle = document.createElement("article"); backpackArticle.classList.add("backpack"); backpackArticle.setAttribute("id", backpack.id); @@ -92,17 +91,17 @@ const backpackList = backpackObjectArray.map((backpack) => { `; - - let strapLengths = backpackArticle.querySelectorAll(".backpack__strap") - newStrapLength(strapLengths) + + let strapLengths = backpackArticle.querySelectorAll(".backpack__strap"); + newStrapLength(strapLengths); let button = backpackArticle.querySelector(".lid-toggle"); - let newArg = "The argument I want to pass to the callback function!" + let newArg = "The argument I want to pass to the callback function!"; // Add event listener button.addEventListener("click", (event) => { - lidToggle(event, button, newArg) - }) + lidToggle(event, button, newArg); + }); return backpackArticle; }); @@ -113,5 +112,3 @@ const main = document.querySelector(".maincontent"); backpackList.forEach((backpack) => { main.append(backpack); }); - - diff --git a/09_08/script.js b/09_08/script.js index 198926dc..597752ba 100755 --- a/09_08/script.js +++ b/09_08/script.js @@ -1,6 +1,12 @@ /** * Solution: Create an event listener - * - Add event listeners to each of the strap length forms. + * - Find the two elements with the .backpack__strap class. + * - Create a function to output the strap length form. + * - Iterate through each item with the .backpack__strap class. + * - Capture the value of the data-side attribute to indicate the strap side. + * - Create a form element. + * - Populate the form with an input and a submit button. + * - Add event listener to each of the strap length forms. * - Update strap length value with value submitted from form. */ import backpackObjectArray from "./components/data.js"; @@ -9,43 +15,43 @@ import backpackObjectArray from "./components/data.js"; * Add event listener to the lid-toggle button. */ const lidToggle = function (event, button, newArg) { - console.log(event) - console.log(newArg) - + console.log(event); + console.log(newArg); + // Find the current backpack object in backpackObjectArray - let backpackObject = backpackObjectArray.find( ({ id }) => id === button.parentElement.id ); - + let backpackObject = backpackObjectArray.find( + ({ id }) => id === button.parentElement.id + ); + // Toggle lidOpen status - backpackObject.lidOpen == true - ? backpackObject.lidOpen = false - : backpackObject.lidOpen = true; + backpackObject.lidOpen == true + ? (backpackObject.lidOpen = false) + : (backpackObject.lidOpen = true); // Toggle button text - button.innerText == "Open lid" - ? button.innerText = "Close lid" - : button.innerText = "Open lid"; + button.innerText == "Open lid" + ? (button.innerText = "Close lid") + : (button.innerText = "Open lid"); // Set visible property status text let status = button.parentElement.querySelector(".backpack__lid span"); status.innerText == "closed" ? (status.innerText = "open") : (status.innerText = "closed"); -} +}; /** * Strap length functionality */ const newStrapLength = (strapArray) => { - // Loop through each element on the list - strapArray.forEach( listElement => { - + strapArray.forEach((listElement) => { // Get what side we are working with - let side = listElement.getAttribute("data-side") + let side = listElement.getAttribute("data-side"); // Create a new form element - const lengthForm = document.createElement("form") - lengthForm.classList.add(`${side}length`) + const lengthForm = document.createElement("form"); + lengthForm.classList.add(`${side}length`); // Populate form with an input and a button lengthForm.innerHTML = ` @@ -55,27 +61,25 @@ const newStrapLength = (strapArray) => { // Add event listener to the form submit action lengthForm.addEventListener("submit", (e) => { - // Stop form from reloading the page - e.preventDefault() + e.preventDefault(); // Get the value from the form input - let newValue = lengthForm.querySelector("input").value + let newValue = lengthForm.querySelector("input").value; // Set the value of the field - listElement.querySelector("span").innerHTML = `${newValue} inches` + listElement.querySelector("span").innerHTML = `${newValue} inches`; // Clear the form input - lengthForm.querySelector("input").value = "" - }) + lengthForm.querySelector("input").value = ""; + }); // Add form to the end of the list element - listElement.append(lengthForm) - }) -} + listElement.append(lengthForm); + }); +}; const backpackList = backpackObjectArray.map((backpack) => { - let backpackArticle = document.createElement("article"); backpackArticle.classList.add("backpack"); backpackArticle.setAttribute("id", backpack.id); @@ -108,17 +112,20 @@ const backpackList = backpackObjectArray.map((backpack) => { `; - - let strapLengths = backpackArticle.querySelectorAll(".backpack__strap") - newStrapLength(strapLengths) + + // Find the two list items with the .backpack__strap class + let strapLengths = backpackArticle.querySelectorAll(".backpack__strap"); + + // Call the newStrapLength() function and pass on the strapLengths node list. + newStrapLength(strapLengths); let button = backpackArticle.querySelector(".lid-toggle"); - let newArg = "The argument I want to pass to the callback function!" + let newArg = "The argument I want to pass to the callback function!"; // Add event listener button.addEventListener("click", (event) => { - lidToggle(event, button, newArg) - }) + lidToggle(event, button, newArg); + }); return backpackArticle; }); @@ -129,5 +136,3 @@ const main = document.querySelector(".maincontent"); backpackList.forEach((backpack) => { main.append(backpack); }); - - diff --git a/10_01/components/Backpack.js b/10_01/components/Backpack.js new file mode 100644 index 00000000..65236404 --- /dev/null +++ b/10_01/components/Backpack.js @@ -0,0 +1,45 @@ +// Set up the Backpack class +class Backpack { + constructor( + id, + name, + volume, + color, + pocketNum, + strapLengthL, + strapLengthR, + lidOpen, + dateAcquired, + image + ) { + this.id = id; + this.name = name; + this.volume = volume; + this.color = color; + this.pocketNum = pocketNum; + this.strapLength = { + left: strapLengthL, + right: strapLengthR, + }; + this.lidOpen = lidOpen; + this.dateAcquired = dateAcquired; + this.image = image; + } + toggleLid(lidStatus) { + this.lidOpen = lidStatus; + } + newStrapLength(lengthLeft, lengthRight) { + this.strapLength.left = lengthLeft; + this.strapLength.right = lengthRight; + } + backpackAge() { + let now = new Date(); + let acquired = new Date(this.dateAcquired); + let elapsed = now - acquired; // elapsed time in milliseconds + let daysSinceAcquired = Math.floor(elapsed / (1000 * 3600 * 24)); + return daysSinceAcquired; + } +} + +// Export the Backpack class to be used by other files +export default Backpack; diff --git a/10_01/components/data.js b/10_01/components/data.js new file mode 100644 index 00000000..4c16376f --- /dev/null +++ b/10_01/components/data.js @@ -0,0 +1,36 @@ +// Import the Backpack class so we can make new Backpack objects. +import Backpack from "./Backpack.js"; + +// Create new Backpack object +const everydayPack = new Backpack( + "pack01", + "Everyday Backpack", + 30, + "grey", + 15, + 26, + 26, + false, + "December 5, 2018 15:00:00 PST", + "../assets/images/everyday.svg" +); + +// Create new Backpack object +const frogPack = new Backpack( + "pack02", + "Frog Backpack", + 8, + "green", + 3, + 10, + 10, + false, + "October 16, 2019 15:00:00 PST", + "../assets/images/frog.svg" +); + +// Add Backpack objects into an array +const backpackObjectArray = [everydayPack, frogPack]; + +// Export the array to be used in other files +export default backpackObjectArray; diff --git a/10_01/index.html b/10_01/index.html new file mode 100644 index 00000000..c3c0235f --- /dev/null +++ b/10_01/index.html @@ -0,0 +1,45 @@ + + + + + + BackpackPacker + + + + + + + + +
    + +
    +
    +

    + Demo project for JavaScript Essential Training, a LinkedIn Learning + course. +

    +
    + + diff --git a/10_01/script.js b/10_01/script.js new file mode 100644 index 00000000..036c01cb --- /dev/null +++ b/10_01/script.js @@ -0,0 +1,131 @@ +/** + * Solution: Create an event listener + * - Add event listeners to each of the strap length forms. + * - Update strap length value with value submitted from form. + */ +import backpackObjectArray from "./components/data.js"; + +/** + * Add event listener to the lid-toggle button. + */ +const lidToggle = function (event, button, newArg) { + console.log(event); + console.log(newArg); + + // Find the current backpack object in backpackObjectArray + let backpackObject = backpackObjectArray.find( + ({ id }) => id === button.parentElement.id + ); + + // Toggle lidOpen status + backpackObject.lidOpen == true + ? (backpackObject.lidOpen = false) + : (backpackObject.lidOpen = true); + + // Toggle button text + button.innerText == "Open lid" + ? (button.innerText = "Close lid") + : (button.innerText = "Open lid"); + + // Set visible property status text + let status = button.parentElement.querySelector(".backpack__lid span"); + status.innerText == "closed" + ? (status.innerText = "open") + : (status.innerText = "closed"); +}; + +/** + * Strap length functionality + */ +const newStrapLength = (strapArray) => { + console.log(strapArray); + // Loop through each element on the list + strapArray.forEach((listElement) => { + // Get what side we are working with + let side = listElement.getAttribute("data-side"); + console.log(side); + + // Create a new form element + const lengthForm = document.createElement("form"); + lengthForm.classList.add(`${side}length`); + + // Populate form with an input and a button + lengthForm.innerHTML = ` + + + `; + + // Add event listener to the form submit action + lengthForm.addEventListener("submit", (e) => { + // Stop form from reloading the page + e.preventDefault(); + + // Get the value from the form input + let newValue = lengthForm.querySelector("input").value; + + // Set the value of the field + listElement.querySelector("span").innerHTML = `${newValue} inches`; + + // Clear the form input + lengthForm.querySelector("input").value = ""; + }); + + // Add form to the end of the list element + listElement.append(lengthForm); + }); +}; + +const backpackList = backpackObjectArray.map((backpack) => { + let backpackArticle = document.createElement("article"); + backpackArticle.classList.add("backpack"); + backpackArticle.setAttribute("id", backpack.id); + + backpackArticle.innerHTML = ` +
    + +
    +

    ${backpack.name}

    +
      +
    • Volume: ${ + backpack.volume + }l
    • +
    • Color: ${ + backpack.color + }
    • +
    • Age: ${backpack.backpackAge()} days old
    • +
    • Number of pockets: ${ + backpack.pocketNum + }
    • +
    • Left strap length: ${ + backpack.strapLength.left + } inches
    • +
    • Right strap length: ${ + backpack.strapLength.right + } inches
    • +
    • Lid status: ${ + backpack.lidOpen ? "open" : "closed" + }
    • +
    + + `; + + let strapLengths = backpackArticle.querySelectorAll(".backpack__strap"); + newStrapLength(strapLengths); + + let button = backpackArticle.querySelector(".lid-toggle"); + let newArg = "The argument I want to pass to the callback function!"; + + // Add event listener + button.addEventListener("click", (event) => { + lidToggle(event, button, newArg); + }); + + return backpackArticle; +}); + +// Append each backpack item to the main +const main = document.querySelector(".maincontent"); + +backpackList.forEach((backpack) => { + main.append(backpack); +}); diff --git a/01_01/Photo.js b/10_02/Photo.js old mode 100755 new mode 100644 similarity index 100% rename from 01_01/Photo.js rename to 10_02/Photo.js diff --git a/package-lock.json b/package-lock.json index 1296e83c..be4dc7a9 100755 --- a/package-lock.json +++ b/package-lock.json @@ -61,12 +61,6 @@ "strip-json-comments": "^3.1.1" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -74,9 +68,9 @@ "dev": true }, "acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, "acorn-jsx": { @@ -86,9 +80,9 @@ "dev": true }, "ajv": { - "version": "6.12.5", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz", - "integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -187,12 +181,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -360,9 +353,9 @@ "dev": true }, "eslint": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz", - "integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", + "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -373,9 +366,9 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", - "eslint-scope": "^5.1.0", + "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", + "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.0", "esquery": "^1.2.0", "esutils": "^2.0.2", @@ -402,6 +395,14 @@ "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + } } }, "eslint-config-standard": { diff --git a/package.json b/package.json index c0e13761..85ac8cff 100755 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "javascript-essential-training-exercise-files", "version": "1.0.0", - "description": "Repository for exercise files used in the LinkedIn Learning course \"JavaScript Essential Training\" instructed by Morten Rand-Hendriksen and published 2020.", + "description": "Repository for exercise files used in the LinkedIn Learning course `JavaScript Essential Training` instructed by Morten Rand-Hendriksen and published 2020.", "main": "index.html", "author": "Morten Rand-Hendriksen", "license": "SEE LICENSE IN LICENSE", "devDependencies": { - "eslint": "^7.9.0", + "eslint": "^7.11.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.0", "eslint-plugin-node": "^11.1.0",