From 2500738fa91feec09189ae38b467d52e74f1d6da Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 27 Sep 2022 23:39:51 -0400 Subject: [PATCH] style: Enable ESLint and Prettier for all files - Remove ESLint rules that overlap with Prettier/EditorConfig - Remove Prettier rules overlapping with EditorConfig - Replace Prettier-eslint with plugin/config versions - Set Environment to ES2022 and remove globals that are not required - Remove babel parser, since covered by ES2022 - Ignore WASM folders because of top level awaits - Rename script commands to match mdn/content - Drop direct ajv dependency --- .eslintignore | 2 + .eslintrc | 36 +- .prettierrc | 12 +- JS-Example-Style-Guide.md | 2 +- .../css-examples/animation/animation-state.js | 52 +- .../css-examples/animation/play-pause.js | 24 +- .../basic-box-model/overflow-anchor.js | 9 +- .../motion-path/offset-playback.js | 24 +- .../transforms/transform-origin.js | 52 +- live-examples/js-examples/array/array-at.js | 4 +- .../js-examples/array/array-filter.js | 11 +- live-examples/js-examples/array/array-find.js | 2 +- .../js-examples/array/array-flatmap.js | 2 +- .../js-examples/array/array-foreach.js | 2 +- live-examples/js-examples/array/array-from.js | 2 +- .../js-examples/array/array-groupby.js | 4 +- live-examples/js-examples/array/array-map.js | 2 +- .../js-examples/array/array-reduce-right.js | 10 +- .../js-examples/bigint/bigint-asintn.js | 6 +- .../js-examples/bigint/bigint-asuintn.js | 6 +- .../bigint/bigint-tolocalestring.js | 4 +- .../js-examples/classes/classes-extends.js | 18 +- .../date/date-tolocaledatestring.js | 7 +- .../expressions-addition-assignment.js | 4 +- .../expressions/expressions-assignment.js | 4 +- .../expressions-bitwise-and-assignment.js | 4 +- .../expressions/expressions-bitwise-and.js | 4 +- .../expressions/expressions-bitwise-not.js | 4 +- .../expressions-bitwise-or-assignment.js | 4 +- .../expressions/expressions-bitwise-or.js | 4 +- .../expressions-bitwise-xor-assignment.js | 4 +- .../expressions/expressions-bitwise-xor.js | 4 +- .../expressions-conditionaloperators.js | 2 +- .../expressions/expressions-equality.js | 2 +- .../expressions-exponentiation-assignment.js | 6 +- .../expressions/expressions-exponentiation.js | 2 +- .../expressions-functionasteriskexpression.js | 2 +- .../expressions-functionexpression.js | 2 +- .../expressions-groupingoperator.js | 2 +- .../expressions/expressions-inequality.js | 2 +- .../expressions-left-shift-assignment.js | 2 +- .../expressions/expressions-left-shift.js | 4 +- .../expressions-multiplication-assignment.js | 4 +- .../expressions/expressions-newtarget.js | 4 +- .../expressions-operatorprecedence.js | 2 +- .../expressions-remainder-assignment.js | 6 +- .../expressions-right-shift-assignment.js | 8 +- .../expressions/expressions-right-shift.js | 10 +- .../expressions-strict-equality.js | 2 +- .../expressions-strict-inequality.js | 2 +- .../expressions-subtraction-assignment.js | 4 +- .../expressions/expressions-this.js | 4 +- ...essions-unsigned-right-shift-assignment.js | 4 +- .../expressions-unsigned-right-shift.js | 6 +- .../expressions/expressions-voidoperator.js | 4 +- .../js-examples/function/function-bind.js | 2 +- .../js-examples/function/function-name.js | 4 +- .../js-examples/functions/functions-arrow.js | 9 +- .../globalprops/globalprops-decodeuri.js | 3 +- .../globalprops-decodeuricomponent.js | 2 +- .../globalprops/globalprops-encodeuri.js | 4 +- .../globalprops/globalprops-infinity.js | 2 +- .../globalprops/globalprops-parseint.js | 4 +- .../js-examples/intl/intl-collator.js | 6 +- .../intl-datetimeformat-prototype-format.js | 7 +- ...tl-datetimeformat-prototype-formatrange.js | 7 +- ...timeformat-prototype-formatrangetoparts.js | 2 +- ...-datetimeformat-prototype-formattoparts.js | 9 +- .../js-examples/intl/intl-datetimeformat.js | 8 +- .../js-examples/intl/intl-displaynames.js | 4 +- ...intl-listformat-prototype-formattoparts.js | 14 +- .../js-examples/intl/intl-listformat.js | 12 +- .../intl/intl-locale-prototype-tostring.js | 10 +- live-examples/js-examples/intl/intl-locale.js | 5 +- ...tl-numberformat-prototype-formattoparts.js | 2 +- .../js-examples/intl/intl-numberformat.js | 16 +- .../intl/intl-segmenter-prototype-segment.js | 4 +- .../js-examples/json/json-stringify.js | 6 +- .../js-examples/map/map-prototype-foreach.js | 7 +- live-examples/js-examples/math/math-atan2.js | 2 +- live-examples/js-examples/math/math-ceil.js | 2 +- live-examples/js-examples/math/math-e.js | 4 +- live-examples/js-examples/math/math-sqrt.js | 2 +- live-examples/js-examples/math/math-tan.js | 2 +- .../js-examples/number/number-max-value.js | 8 +- .../js-examples/number/number-min-value.js | 2 +- .../js-examples/number/number-parsefloat.js | 2 +- .../number/number-tolocalestring.js | 2 +- .../js-examples/object/object-create.js | 2 +- .../object/object-prototype-valueof.js | 2 +- .../js-examples/promise/promise-allsettled.js | 9 +- .../promise/promise-constructor.js | 1 - .../js-examples/promise/promise-resolve.js | 1 - .../js-examples/promise/promise-then.js | 1 - .../proxyhandler/proxyhandler-apply.js | 2 +- .../proxyhandler-defineproperty.js | 2 +- .../proxyhandler/proxyhandler-get.js | 2 +- .../proxyhandler/proxyhandler-set.js | 2 +- .../js-examples/reflect/reflect-apply.js | 8 +- .../regexp/regexp-groups-ranges.js | 2 +- .../js-examples/regexp/regexp-lastindex.js | 2 +- .../regexp/regexp-prototype-@@split.js | 2 +- .../regexp/regexp-prototype-flags.js | 4 +- .../regexp/regexp-prototype-source.js | 2 +- .../statement/statement-async-for-in.js | 9 +- .../statement-async-function-asterisk.js | 9 +- .../js-examples/statement/statement-async.js | 2 +- .../statement/statement-default.js | 2 +- .../js-examples/statement/statement-empty.js | 2 +- .../statement/statement-forawaitof.js | 2 +- .../js-examples/statement/statement-label.js | 3 +- live-examples/js-examples/string/string-at.js | 8 +- .../js-examples/string/string-charcodeat.js | 6 +- .../string/string-fromcodepoint.js | 2 +- .../js-examples/string/string-includes.js | 6 +- .../js-examples/string/string-indexof.js | 14 +- .../js-examples/string/string-iterator.js | 2 +- .../js-examples/string/string-lastindexof.js | 9 +- .../js-examples/string/string-raw.js | 1 - .../js-examples/string/string-repeat.js | 2 +- .../js-examples/string/string-replace.js | 4 +- .../js-examples/string/string-replaceall.js | 6 +- .../js-examples/string/string-search.js | 3 +- .../js-examples/symbol/symbol-matchall.js | 2 +- .../js-examples/symbol/symbol-species.js | 6 +- .../js-examples/symbol/symbol-split.js | 4 +- .../js-examples/typedarray/typedarray-at.js | 8 +- .../typedarray/typedarray-copywithin.js | 2 +- .../js-examples/typedarray/typedarray-of.js | 2 +- .../typedarray/typedarray-values.js | 2 +- .../js/document-queryselector.js | 16 +- package.json | 10 +- yarn.lock | 511 ++---------------- 133 files changed, 469 insertions(+), 820 deletions(-) diff --git a/.eslintignore b/.eslintignore index c42089b2a2..595853fb7e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,4 @@ +docs/ js/lib/* js/mode/* +live-examples/wat-examples/ diff --git a/.eslintrc b/.eslintrc index 325cc0474d..41dbe4cfe0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,30 +1,22 @@ { "env": { "browser": true, - "es6": true, + "es2022": true, "node": true }, - "extends": "eslint:recommended", - "parser": "@babel/eslint-parser", + "extends": ["eslint:recommended", "plugin:prettier/recommended"], "parserOptions": { - "ecmaVersion": 6, - "sourceType": "script", - "requireConfigFile": false + "sourceType": "script" }, "rules": { - "brace-style": ["error", "1tbs", { "allowSingleLine": true }], "camelcase": [ "error", { "properties": "always" } ], - "comma-spacing": "error", - "comma-style": "error", - "curly": ["error", "all"], "eol-last": "error", "eqeqeq": ["error", "smart"], - "func-call-spacing": "error", "new-cap": "warn", "no-array-constructor": "error", "no-console": [ @@ -34,39 +26,19 @@ } ], "no-new-object": "error", - "indent": [ - "error", - 2, - { - "SwitchCase": 1 - } - ], - "key-spacing": "error", - "keyword-spacing": "error", - "linebreak-style": ["error", "unix"], "no-control-regex": "error", "no-else-return": "error", "no-global-assign": "error", - "no-multiple-empty-lines": "error", "no-prototype-builtins": "off", - "no-trailing-spaces": "error", "no-var": "error", - "object-curly-spacing": ["error", "always"], "one-var-declaration-per-line": ["error", "always"], "prefer-arrow-callback": "error", "prefer-const": "error", "prefer-template": "error", - "quotes": ["error", "single"], - "semi": ["error", "always"], - "space-before-function-paren": ["error", "never"], "space-infix-ops": "error" }, "globals": { - "SharedArrayBuffer": true, - "Atomics": true, - "BigInt": true, - "getShadowRoot": true, - "globalThis": true // will be supported in eslint 7.0 + "getShadowRoot": true }, "overrides": [ { diff --git a/.prettierrc b/.prettierrc index 7878476aab..d57e24ccd9 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,13 +1,5 @@ { "singleQuote": true, - "tabWidth": 4, - "printWidth": 120, - "overrides": [ - { - "files": "*.md", - "options": { - "tabWidth": 2 - } - } - ] + "semi": true, + "trailingComma": "none" } diff --git a/JS-Example-Style-Guide.md b/JS-Example-Style-Guide.md index 22e924a7fe..4216a1de8f 100644 --- a/JS-Example-Style-Guide.md +++ b/JS-Example-Style-Guide.md @@ -155,7 +155,7 @@ yarn run lint:js We've also provided the following command: ```sh -yarn run lint:js:fix +yarn run fix:js ``` This runs ESLint with the `--fix` option, which tries to fix issues. diff --git a/live-examples/css-examples/animation/animation-state.js b/live-examples/css-examples/animation/animation-state.js index bc6741f7ad..f92d213dc8 100644 --- a/live-examples/css-examples/animation/animation-state.js +++ b/live-examples/css-examples/animation/animation-state.js @@ -1,35 +1,35 @@ 'use strict'; -window.addEventListener('load', function() { - const el = document.getElementById('example-element'); - const status = document.getElementById('playstatus'); +window.addEventListener('load', () => { + const el = document.getElementById('example-element'); + const status = document.getElementById('playstatus'); - function update() { - status.textContent = 'delaying'; - el.className = ''; - window.requestAnimationFrame(function() { - window.requestAnimationFrame(function() { - el.className = 'animating'; - }); - }); - } - - el.addEventListener('animationstart', function() { - status.textContent = 'playing'; + function update() { + status.textContent = 'delaying'; + el.className = ''; + window.requestAnimationFrame(() => { + window.requestAnimationFrame(() => { + el.className = 'animating'; + }); }); + } - el.addEventListener('animationend', function() { - status.textContent = 'finished'; - }); + el.addEventListener('animationstart', () => { + status.textContent = 'playing'; + }); - const observer = new MutationObserver(function() { - update(); - }); - - observer.observe(el, { - attributes: true, - attributeFilter: ['style'] - }); + el.addEventListener('animationend', () => { + status.textContent = 'finished'; + }); + const observer = new MutationObserver(() => { update(); + }); + + observer.observe(el, { + attributes: true, + attributeFilter: ['style'] + }); + + update(); }); diff --git a/live-examples/css-examples/animation/play-pause.js b/live-examples/css-examples/animation/play-pause.js index 6d36ea7370..e149191140 100644 --- a/live-examples/css-examples/animation/play-pause.js +++ b/live-examples/css-examples/animation/play-pause.js @@ -1,16 +1,16 @@ 'use strict'; -window.addEventListener('load', function() { - const el = document.getElementById('example-element'); - const button = document.getElementById('play-pause'); +window.addEventListener('load', () => { + const el = document.getElementById('example-element'); + const button = document.getElementById('play-pause'); - button.addEventListener('click', function() { - if (el.classList.contains('running')) { - el.classList.remove('running'); - button.textContent = 'Play'; - } else { - el.classList.add('running'); - button.textContent = 'Pause'; - } - }); + button.addEventListener('click', () => { + if (el.classList.contains('running')) { + el.classList.remove('running'); + button.textContent = 'Play'; + } else { + el.classList.add('running'); + button.textContent = 'Pause'; + } + }); }); diff --git a/live-examples/css-examples/basic-box-model/overflow-anchor.js b/live-examples/css-examples/basic-box-model/overflow-anchor.js index ea9287350b..22b15f472d 100644 --- a/live-examples/css-examples/basic-box-model/overflow-anchor.js +++ b/live-examples/css-examples/basic-box-model/overflow-anchor.js @@ -5,14 +5,17 @@ window.addEventListener('load', () => { function setInitialState() { example.innerHTML = ''; - Array.from(({ length: 10 }), (_, i) => i).forEach(addContent); + Array.from({ length: 10 }, (_, i) => i).forEach(addContent); example.scrollTop = example.scrollHeight; } function addContent() { - console.log('adding content') + console.log('adding content'); const magicNumber = Math.floor(Math.random() * 10000); - example.insertAdjacentHTML('afterbegin', `
New Magic Number: ${magicNumber}
`); + example.insertAdjacentHTML( + 'afterbegin', + `
New Magic Number: ${magicNumber}
` + ); } button.addEventListener('click', () => { diff --git a/live-examples/css-examples/motion-path/offset-playback.js b/live-examples/css-examples/motion-path/offset-playback.js index 53bcb6ffe6..d7858af770 100644 --- a/live-examples/css-examples/motion-path/offset-playback.js +++ b/live-examples/css-examples/motion-path/offset-playback.js @@ -1,14 +1,14 @@ -window.addEventListener('load', function() { - const example = document.getElementById('example-element'); - const button = document.getElementById('playback'); +window.addEventListener('load', () => { + const example = document.getElementById('example-element'); + const button = document.getElementById('playback'); - button.addEventListener('click', function() { - if (example.classList.contains('running')) { - example.classList.remove('running'); - button.textContent = 'Play'; - } else { - example.classList.add('running'); - button.textContent = 'Pause'; - } - }); + button.addEventListener('click', () => { + if (example.classList.contains('running')) { + example.classList.remove('running'); + button.textContent = 'Play'; + } else { + example.classList.add('running'); + button.textContent = 'Pause'; + } + }); }); diff --git a/live-examples/css-examples/transforms/transform-origin.js b/live-examples/css-examples/transforms/transform-origin.js index 067e3aa053..6260dc89fc 100644 --- a/live-examples/css-examples/transforms/transform-origin.js +++ b/live-examples/css-examples/transforms/transform-origin.js @@ -1,36 +1,36 @@ 'use strict'; -window.addEventListener('load', function() { - function update() { - const selected = document.querySelector('.selected code'); +window.addEventListener('load', () => { + function update() { + const selected = document.querySelector('.selected code'); - /* Restart the animation + /* Restart the animation https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animations/Tips */ - el.className = ''; - window.requestAnimationFrame(function() { - window.requestAnimationFrame(function() { - el.className = selected.dataset.animation; - }); - }); + el.className = ''; + window.requestAnimationFrame(() => { + window.requestAnimationFrame(() => { + el.className = selected.dataset.animation; + }); + }); - const transformOrigin = getComputedStyle(el).transformOrigin; - const pos = transformOrigin.split(/\s+/); - crosshair.style.left = 'calc(' + pos[0] + ' - 12px)'; - crosshair.style.top = 'calc(' + pos[1] + ' - 12px)'; - } + const transformOrigin = getComputedStyle(el).transformOrigin; + const pos = transformOrigin.split(/\s+/); + crosshair.style.left = `calc(${pos[0]} - 12px)`; + crosshair.style.top = `calc(${pos[1]} - 12px)`; + } - const crosshair = document.getElementById('crosshair'); - const el = document.getElementById('example-element'); + const crosshair = document.getElementById('crosshair'); + const el = document.getElementById('example-element'); - const observer = new MutationObserver(function() { - update(); - }); + const observer = new MutationObserver(() => { + update(); + }); - observer.observe(el, { - attributes: true, - attributeFilter: ['style'] - }); + observer.observe(el, { + attributes: true, + attributeFilter: ['style'] + }); - update(); - crosshair.style.opacity = '1'; + update(); + crosshair.style.opacity = '1'; }); diff --git a/live-examples/js-examples/array/array-at.js b/live-examples/js-examples/array/array-at.js index 64f7ef0800..b699c6b383 100644 --- a/live-examples/js-examples/array/array-at.js +++ b/live-examples/js-examples/array/array-at.js @@ -2,7 +2,9 @@ const array1 = [5, 12, 8, 130, 44]; let index = 2; -console.log(`Using an index of ${index} the item returned is ${array1.at(index)}`); +console.log( + `Using an index of ${index} the item returned is ${array1.at(index)}` +); // expected output: "Using an index of 2 the item returned is 8" index = -2; diff --git a/live-examples/js-examples/array/array-filter.js b/live-examples/js-examples/array/array-filter.js index 11295e50b6..f592382f82 100644 --- a/live-examples/js-examples/array/array-filter.js +++ b/live-examples/js-examples/array/array-filter.js @@ -1,6 +1,13 @@ -const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present']; +const words = [ + 'spray', + 'limit', + 'elite', + 'exuberant', + 'destruction', + 'present' +]; -const result = words.filter(word => word.length > 6); +const result = words.filter((word) => word.length > 6); console.log(result); // expected output: Array ["exuberant", "destruction", "present"] diff --git a/live-examples/js-examples/array/array-find.js b/live-examples/js-examples/array/array-find.js index 3eac65f5a4..fe74f2b178 100644 --- a/live-examples/js-examples/array/array-find.js +++ b/live-examples/js-examples/array/array-find.js @@ -1,6 +1,6 @@ const array1 = [5, 12, 8, 130, 44]; -const found = array1.find(element => element > 10); +const found = array1.find((element) => element > 10); console.log(found); // expected output: 12 diff --git a/live-examples/js-examples/array/array-flatmap.js b/live-examples/js-examples/array/array-flatmap.js index adfa91b1a2..f413c401ca 100644 --- a/live-examples/js-examples/array/array-flatmap.js +++ b/live-examples/js-examples/array/array-flatmap.js @@ -1,6 +1,6 @@ const arr1 = [1, 2, [3], [4, 5], 6, []]; -const flattened = arr1.flatMap(num => num); +const flattened = arr1.flatMap((num) => num); console.log(flattened); // expected output: Array [1, 2, 3, 4, 5, 6] diff --git a/live-examples/js-examples/array/array-foreach.js b/live-examples/js-examples/array/array-foreach.js index 1bf6b0f595..80a7670785 100644 --- a/live-examples/js-examples/array/array-foreach.js +++ b/live-examples/js-examples/array/array-foreach.js @@ -1,6 +1,6 @@ const array1 = ['a', 'b', 'c']; -array1.forEach(element => console.log(element)); +array1.forEach((element) => console.log(element)); // expected output: "a" // expected output: "b" diff --git a/live-examples/js-examples/array/array-from.js b/live-examples/js-examples/array/array-from.js index 721a6cf2e9..c4e98e20c9 100644 --- a/live-examples/js-examples/array/array-from.js +++ b/live-examples/js-examples/array/array-from.js @@ -1,5 +1,5 @@ console.log(Array.from('foo')); // expected output: Array ["f", "o", "o"] -console.log(Array.from([1, 2, 3], x => x + x)); +console.log(Array.from([1, 2, 3], (x) => x + x)); // expected output: Array [2, 4, 6] diff --git a/live-examples/js-examples/array/array-groupby.js b/live-examples/js-examples/array/array-groupby.js index 6eca558037..0c66f19fee 100644 --- a/live-examples/js-examples/array/array-groupby.js +++ b/live-examples/js-examples/array/array-groupby.js @@ -1,12 +1,12 @@ const inventory = [ { name: 'asparagus', type: 'vegetables', quantity: 5 }, - { name: 'bananas', type: 'fruit', quantity: 0 }, + { name: 'bananas', type: 'fruit', quantity: 0 }, { name: 'goat', type: 'meat', quantity: 23 }, { name: 'cherries', type: 'fruit', quantity: 5 }, { name: 'fish', type: 'meat', quantity: 22 } ]; -const result = inventory.groupBy( ({ type }) => type ); +const result = inventory.groupBy(({ type }) => type); console.log(result.vegetables); // expected output: Array [Object { name: "asparagus", type: "vegetables", quantity: 5 }] diff --git a/live-examples/js-examples/array/array-map.js b/live-examples/js-examples/array/array-map.js index 39c94c6538..78a5cc425e 100644 --- a/live-examples/js-examples/array/array-map.js +++ b/live-examples/js-examples/array/array-map.js @@ -1,7 +1,7 @@ const array1 = [1, 4, 9, 16]; // pass a function to map -const map1 = array1.map(x => x * 2); +const map1 = array1.map((x) => x * 2); console.log(map1); // expected output: Array [2, 8, 18, 32] diff --git a/live-examples/js-examples/array/array-reduce-right.js b/live-examples/js-examples/array/array-reduce-right.js index 6c508c3ea3..364586f5d3 100644 --- a/live-examples/js-examples/array/array-reduce-right.js +++ b/live-examples/js-examples/array/array-reduce-right.js @@ -1,6 +1,12 @@ -const array1 = [[0, 1], [2, 3], [4, 5]]; +const array1 = [ + [0, 1], + [2, 3], + [4, 5] +]; -const result = array1.reduceRight((accumulator, currentValue) => accumulator.concat(currentValue)); +const result = array1.reduceRight((accumulator, currentValue) => + accumulator.concat(currentValue) +); console.log(result); // expected output: Array [4, 5, 2, 3, 0, 1] diff --git a/live-examples/js-examples/bigint/bigint-asintn.js b/live-examples/js-examples/bigint/bigint-asintn.js index d0fbe2f910..5cf10dc5eb 100644 --- a/live-examples/js-examples/bigint/bigint-asintn.js +++ b/live-examples/js-examples/bigint/bigint-asintn.js @@ -1,9 +1,9 @@ const max = 2n ** (64n - 1n) - 1n; function check64bit(number) { - (number > max) ? - console.log('Number doesn\'t fit in signed 64-bit integer!') : - console.log(BigInt.asIntN(64, number)); + number > max + ? console.log("Number doesn't fit in signed 64-bit integer!") + : console.log(BigInt.asIntN(64, number)); } check64bit(2n ** 64n); diff --git a/live-examples/js-examples/bigint/bigint-asuintn.js b/live-examples/js-examples/bigint/bigint-asuintn.js index 7fa13d4e3d..1b663c7cab 100644 --- a/live-examples/js-examples/bigint/bigint-asuintn.js +++ b/live-examples/js-examples/bigint/bigint-asuintn.js @@ -1,9 +1,9 @@ const max = 2n ** 64n - 1n; function check64bit(number) { - (number > max) ? - console.log('Number doesn\'t fit in unsigned 64-bit integer!') : - console.log(BigInt.asUintN(64, number)); + number > max + ? console.log("Number doesn't fit in unsigned 64-bit integer!") + : console.log(BigInt.asUintN(64, number)); } check64bit(2n ** 64n); diff --git a/live-examples/js-examples/bigint/bigint-tolocalestring.js b/live-examples/js-examples/bigint/bigint-tolocalestring.js index ccfa939dbf..647eba2c2c 100644 --- a/live-examples/js-examples/bigint/bigint-tolocalestring.js +++ b/live-examples/js-examples/bigint/bigint-tolocalestring.js @@ -5,5 +5,7 @@ console.log(bigint.toLocaleString('de-DE')); // expected output: "123.456.789.123.456.789" // request a currency format -console.log(bigint.toLocaleString('de-DE', { style: 'currency', currency: 'EUR' })); +console.log( + bigint.toLocaleString('de-DE', { style: 'currency', currency: 'EUR' }) +); // expected output: "123.456.789.123.456.789,00 €" diff --git a/live-examples/js-examples/classes/classes-extends.js b/live-examples/js-examples/classes/classes-extends.js index 61fc5fc9c5..2ee00e9819 100644 --- a/live-examples/js-examples/classes/classes-extends.js +++ b/live-examples/js-examples/classes/classes-extends.js @@ -1,11 +1,21 @@ class DateFormatter extends Date { - getFormattedDate() { - const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + const months = [ + 'Jan', + 'Feb', + 'Mar', + 'Apr', + 'May', + 'Jun', + 'Jul', + 'Aug', + 'Sep', + 'Oct', + 'Nov', + 'Dec' + ]; return `${this.getDate()}-${months[this.getMonth()]}-${this.getFullYear()}`; } - } console.log(new DateFormatter('August 19, 1975 23:15:30').getFormattedDate()); diff --git a/live-examples/js-examples/date/date-tolocaledatestring.js b/live-examples/js-examples/date/date-tolocaledatestring.js index 77b24bceff..2ef4e42a2f 100644 --- a/live-examples/js-examples/date/date-tolocaledatestring.js +++ b/live-examples/js-examples/date/date-tolocaledatestring.js @@ -1,5 +1,10 @@ const event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0)); -const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; +const options = { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric' +}; console.log(event.toLocaleDateString('de-DE', options)); // expected output (varies according to local timezone): Donnerstag, 20. Dezember 2012 diff --git a/live-examples/js-examples/expressions/expressions-addition-assignment.js b/live-examples/js-examples/expressions/expressions-addition-assignment.js index deecfea27d..e6a44ee6e9 100644 --- a/live-examples/js-examples/expressions/expressions-addition-assignment.js +++ b/live-examples/js-examples/expressions/expressions-addition-assignment.js @@ -1,8 +1,8 @@ let a = 2; let b = 'hello'; -console.log(a += 3); // addition +console.log((a += 3)); // addition // expected output: 5 -console.log(b += ' world'); // concatenation +console.log((b += ' world')); // concatenation // expected output: "hello world" diff --git a/live-examples/js-examples/expressions/expressions-assignment.js b/live-examples/js-examples/expressions/expressions-assignment.js index f00e10258e..88452342ba 100644 --- a/live-examples/js-examples/expressions/expressions-assignment.js +++ b/live-examples/js-examples/expressions/expressions-assignment.js @@ -4,8 +4,8 @@ const y = 3; console.log(x); // expected output: 2 -console.log(x = y + 1); // 3 + 1 +console.log((x = y + 1)); // 3 + 1 // expected output: 4 -console.log(x = x * y); // 4 * 3 +console.log((x = x * y)); // 4 * 3 // expected output: 12 diff --git a/live-examples/js-examples/expressions/expressions-bitwise-and-assignment.js b/live-examples/js-examples/expressions/expressions-bitwise-and-assignment.js index 2657341144..2cff575cae 100644 --- a/live-examples/js-examples/expressions/expressions-bitwise-and-assignment.js +++ b/live-examples/js-examples/expressions/expressions-bitwise-and-assignment.js @@ -1,5 +1,5 @@ -let a = 5; // 00000000000000000000000000000101 -a &= 3; // 00000000000000000000000000000011 +let a = 5; // 00000000000000000000000000000101 +a &= 3; // 00000000000000000000000000000011 console.log(a); // 00000000000000000000000000000001 // expected output: 1 diff --git a/live-examples/js-examples/expressions/expressions-bitwise-and.js b/live-examples/js-examples/expressions/expressions-bitwise-and.js index 806343e9df..99efc789a6 100644 --- a/live-examples/js-examples/expressions/expressions-bitwise-and.js +++ b/live-examples/js-examples/expressions/expressions-bitwise-and.js @@ -1,5 +1,5 @@ -const a = 5; // 00000000000000000000000000000101 -const b = 3; // 00000000000000000000000000000011 +const a = 5; // 00000000000000000000000000000101 +const b = 3; // 00000000000000000000000000000011 console.log(a & b); // 00000000000000000000000000000001 // expected output: 1 diff --git a/live-examples/js-examples/expressions/expressions-bitwise-not.js b/live-examples/js-examples/expressions/expressions-bitwise-not.js index ffe0c92ca3..6104943059 100644 --- a/live-examples/js-examples/expressions/expressions-bitwise-not.js +++ b/live-examples/js-examples/expressions/expressions-bitwise-not.js @@ -1,5 +1,5 @@ -const a = 5; // 00000000000000000000000000000101 -const b = -3; // 11111111111111111111111111111101 +const a = 5; // 00000000000000000000000000000101 +const b = -3; // 11111111111111111111111111111101 console.log(~a); // 11111111111111111111111111111010 // expected output: -6 diff --git a/live-examples/js-examples/expressions/expressions-bitwise-or-assignment.js b/live-examples/js-examples/expressions/expressions-bitwise-or-assignment.js index 358e2605c5..62ff922464 100644 --- a/live-examples/js-examples/expressions/expressions-bitwise-or-assignment.js +++ b/live-examples/js-examples/expressions/expressions-bitwise-or-assignment.js @@ -1,5 +1,5 @@ -let a = 5; // 00000000000000000000000000000101 -a |= 3; // 00000000000000000000000000000011 +let a = 5; // 00000000000000000000000000000101 +a |= 3; // 00000000000000000000000000000011 console.log(a); // 00000000000000000000000000000111 // expected output: 7 diff --git a/live-examples/js-examples/expressions/expressions-bitwise-or.js b/live-examples/js-examples/expressions/expressions-bitwise-or.js index 9979c7a046..74e7c2223f 100644 --- a/live-examples/js-examples/expressions/expressions-bitwise-or.js +++ b/live-examples/js-examples/expressions/expressions-bitwise-or.js @@ -1,5 +1,5 @@ -const a = 5; // 00000000000000000000000000000101 -const b = 3; // 00000000000000000000000000000011 +const a = 5; // 00000000000000000000000000000101 +const b = 3; // 00000000000000000000000000000011 console.log(a | b); // 00000000000000000000000000000111 // expected output: 7 diff --git a/live-examples/js-examples/expressions/expressions-bitwise-xor-assignment.js b/live-examples/js-examples/expressions/expressions-bitwise-xor-assignment.js index 7718d3480d..f443f3495d 100644 --- a/live-examples/js-examples/expressions/expressions-bitwise-xor-assignment.js +++ b/live-examples/js-examples/expressions/expressions-bitwise-xor-assignment.js @@ -1,5 +1,5 @@ -let a = 5; // 00000000000000000000000000000101 -a ^= 3; // 00000000000000000000000000000011 +let a = 5; // 00000000000000000000000000000101 +a ^= 3; // 00000000000000000000000000000011 console.log(a); // 00000000000000000000000000000110 // expected output: 6 diff --git a/live-examples/js-examples/expressions/expressions-bitwise-xor.js b/live-examples/js-examples/expressions/expressions-bitwise-xor.js index 0cddcd7c32..d093718e27 100644 --- a/live-examples/js-examples/expressions/expressions-bitwise-xor.js +++ b/live-examples/js-examples/expressions/expressions-bitwise-xor.js @@ -1,5 +1,5 @@ -const a = 5; // 00000000000000000000000000000101 -const b = 3; // 00000000000000000000000000000011 +const a = 5; // 00000000000000000000000000000101 +const b = 3; // 00000000000000000000000000000011 console.log(a ^ b); // 00000000000000000000000000000110 // expected output: 6 diff --git a/live-examples/js-examples/expressions/expressions-conditionaloperators.js b/live-examples/js-examples/expressions/expressions-conditionaloperators.js index f5dcaccc0d..19d29351a4 100644 --- a/live-examples/js-examples/expressions/expressions-conditionaloperators.js +++ b/live-examples/js-examples/expressions/expressions-conditionaloperators.js @@ -1,5 +1,5 @@ function getFee(isMember) { - return (isMember ? '$2.00' : '$10.00'); + return isMember ? '$2.00' : '$10.00'; } console.log(getFee(true)); diff --git a/live-examples/js-examples/expressions/expressions-equality.js b/live-examples/js-examples/expressions/expressions-equality.js index 9a7d0990e8..ecb1f477ab 100644 --- a/live-examples/js-examples/expressions/expressions-equality.js +++ b/live-examples/js-examples/expressions/expressions-equality.js @@ -4,7 +4,7 @@ console.log(1 == 1); console.log('hello' == 'hello'); // expected output: true -console.log('1' == 1); +console.log('1' == 1); // expected output: true console.log(0 == false); diff --git a/live-examples/js-examples/expressions/expressions-exponentiation-assignment.js b/live-examples/js-examples/expressions/expressions-exponentiation-assignment.js index 46274ea641..70e12543f9 100644 --- a/live-examples/js-examples/expressions/expressions-exponentiation-assignment.js +++ b/live-examples/js-examples/expressions/expressions-exponentiation-assignment.js @@ -1,10 +1,10 @@ let a = 3; -console.log(a **= 2); +console.log((a **= 2)); // expected output: 9 -console.log(a **= 0); +console.log((a **= 0)); // expected output: 1 -console.log(a **= 'hello'); +console.log((a **= 'hello')); // expected output: NaN diff --git a/live-examples/js-examples/expressions/expressions-exponentiation.js b/live-examples/js-examples/expressions/expressions-exponentiation.js index 2327f1309f..6739cdff60 100644 --- a/live-examples/js-examples/expressions/expressions-exponentiation.js +++ b/live-examples/js-examples/expressions/expressions-exponentiation.js @@ -4,7 +4,7 @@ console.log(3 ** 4); console.log(10 ** -2); // expected output: 0.01 -console.log(2 ** 3 ** 2); +console.log(2 ** (3 ** 2)); // expected output: 512 console.log((2 ** 3) ** 2); diff --git a/live-examples/js-examples/expressions/expressions-functionasteriskexpression.js b/live-examples/js-examples/expressions/expressions-functionasteriskexpression.js index 247dbd937d..5aec08f267 100644 --- a/live-examples/js-examples/expressions/expressions-functionasteriskexpression.js +++ b/live-examples/js-examples/expressions/expressions-functionasteriskexpression.js @@ -1,4 +1,4 @@ -const foo = function*() { +const foo = function* () { yield 'a'; yield 'b'; yield 'c'; diff --git a/live-examples/js-examples/expressions/expressions-functionexpression.js b/live-examples/js-examples/expressions/expressions-functionexpression.js index 946fad822b..ceb0553d03 100644 --- a/live-examples/js-examples/expressions/expressions-functionexpression.js +++ b/live-examples/js-examples/expressions/expressions-functionexpression.js @@ -1,4 +1,4 @@ -const getRectArea = function(width, height) { +const getRectArea = function (width, height) { return width * height; }; diff --git a/live-examples/js-examples/expressions/expressions-groupingoperator.js b/live-examples/js-examples/expressions/expressions-groupingoperator.js index 9806eafde7..5ba6bdb6ab 100644 --- a/live-examples/js-examples/expressions/expressions-groupingoperator.js +++ b/live-examples/js-examples/expressions/expressions-groupingoperator.js @@ -1,7 +1,7 @@ console.log(1 + 2 * 3); // 1 + 6 // expected output: 7 -console.log(1 + (2 * 3)); // 1 + 6 +console.log(1 + 2 * 3); // 1 + 6 // expected output: 7 console.log((1 + 2) * 3); // 3 * 3 diff --git a/live-examples/js-examples/expressions/expressions-inequality.js b/live-examples/js-examples/expressions/expressions-inequality.js index b9cdad314f..22b7e3ccb8 100644 --- a/live-examples/js-examples/expressions/expressions-inequality.js +++ b/live-examples/js-examples/expressions/expressions-inequality.js @@ -4,7 +4,7 @@ console.log(1 != 1); console.log('hello' != 'hello'); // expected output: false -console.log('1' != 1); +console.log('1' != 1); // expected output: false console.log(0 != false); diff --git a/live-examples/js-examples/expressions/expressions-left-shift-assignment.js b/live-examples/js-examples/expressions/expressions-left-shift-assignment.js index 4997544c7f..15914b0226 100644 --- a/live-examples/js-examples/expressions/expressions-left-shift-assignment.js +++ b/live-examples/js-examples/expressions/expressions-left-shift-assignment.js @@ -1,6 +1,6 @@ let a = 5; // 00000000000000000000000000000101 -a <<= 2; // 00000000000000000000000000010100 +a <<= 2; // 00000000000000000000000000010100 console.log(a); // expected output: 20 diff --git a/live-examples/js-examples/expressions/expressions-left-shift.js b/live-examples/js-examples/expressions/expressions-left-shift.js index 00d2235b96..1023962df7 100644 --- a/live-examples/js-examples/expressions/expressions-left-shift.js +++ b/live-examples/js-examples/expressions/expressions-left-shift.js @@ -1,5 +1,5 @@ -const a = 5; // 00000000000000000000000000000101 -const b = 2; // 00000000000000000000000000000010 +const a = 5; // 00000000000000000000000000000101 +const b = 2; // 00000000000000000000000000000010 console.log(a << b); // 00000000000000000000000000010100 // expected output: 20 diff --git a/live-examples/js-examples/expressions/expressions-multiplication-assignment.js b/live-examples/js-examples/expressions/expressions-multiplication-assignment.js index f55f380d21..73c2f33375 100644 --- a/live-examples/js-examples/expressions/expressions-multiplication-assignment.js +++ b/live-examples/js-examples/expressions/expressions-multiplication-assignment.js @@ -1,7 +1,7 @@ let a = 2; -console.log(a *= 3); +console.log((a *= 3)); // expected output: 6 -console.log(a *= 'hello'); +console.log((a *= 'hello')); // expected output: NaN diff --git a/live-examples/js-examples/expressions/expressions-newtarget.js b/live-examples/js-examples/expressions/expressions-newtarget.js index 763e6b0723..58361f213f 100644 --- a/live-examples/js-examples/expressions/expressions-newtarget.js +++ b/live-examples/js-examples/expressions/expressions-newtarget.js @@ -1,5 +1,7 @@ function Foo() { - if (!new.target) { throw 'Foo() must be called with new'; } + if (!new.target) { + throw 'Foo() must be called with new'; + } } try { diff --git a/live-examples/js-examples/expressions/expressions-operatorprecedence.js b/live-examples/js-examples/expressions/expressions-operatorprecedence.js index ded4145e26..7e075539fe 100644 --- a/live-examples/js-examples/expressions/expressions-operatorprecedence.js +++ b/live-examples/js-examples/expressions/expressions-operatorprecedence.js @@ -7,5 +7,5 @@ console.log(4 * 3 ** 2); // 4 * 9 let a; let b; -console.log(a = b = 5); +console.log((a = b = 5)); // expected output: 5 diff --git a/live-examples/js-examples/expressions/expressions-remainder-assignment.js b/live-examples/js-examples/expressions/expressions-remainder-assignment.js index ad09ece883..5d94926d99 100644 --- a/live-examples/js-examples/expressions/expressions-remainder-assignment.js +++ b/live-examples/js-examples/expressions/expressions-remainder-assignment.js @@ -1,10 +1,10 @@ let a = 3; -console.log(a %= 2); +console.log((a %= 2)); // expected output: 1 -console.log(a %= 0); +console.log((a %= 0)); // expected output: NaN -console.log(a %= 'hello'); +console.log((a %= 'hello')); // expected output: NaN diff --git a/live-examples/js-examples/expressions/expressions-right-shift-assignment.js b/live-examples/js-examples/expressions/expressions-right-shift-assignment.js index 018a6b9025..9efe79bdeb 100644 --- a/live-examples/js-examples/expressions/expressions-right-shift-assignment.js +++ b/live-examples/js-examples/expressions/expressions-right-shift-assignment.js @@ -1,11 +1,11 @@ -let a = 5; // 00000000000000000000000000000101 +let a = 5; // 00000000000000000000000000000101 -a >>= 2; // 00000000000000000000000000000001 +a >>= 2; // 00000000000000000000000000000001 console.log(a); // expected output: 1 -let b = -5; // 11111111111111111111111111111011 +let b = -5; // 11111111111111111111111111111011 -b >>= 2; // 11111111111111111111111111111110 +b >>= 2; // 11111111111111111111111111111110 console.log(b); // expected output: -2 diff --git a/live-examples/js-examples/expressions/expressions-right-shift.js b/live-examples/js-examples/expressions/expressions-right-shift.js index 202d7b9163..e73aa554d8 100644 --- a/live-examples/js-examples/expressions/expressions-right-shift.js +++ b/live-examples/js-examples/expressions/expressions-right-shift.js @@ -1,9 +1,9 @@ -const a = 5; // 00000000000000000000000000000101 -const b = 2; // 00000000000000000000000000000010 -const c = -5; // 11111111111111111111111111111011 +const a = 5; // 00000000000000000000000000000101 +const b = 2; // 00000000000000000000000000000010 +const c = -5; // 11111111111111111111111111111011 -console.log(a >> b); // 00000000000000000000000000000001 +console.log(a >> b); // 00000000000000000000000000000001 // expected output: 1 -console.log(c >> b); // 11111111111111111111111111111110 +console.log(c >> b); // 11111111111111111111111111111110 // expected output: -2 diff --git a/live-examples/js-examples/expressions/expressions-strict-equality.js b/live-examples/js-examples/expressions/expressions-strict-equality.js index 08ec1b9ba8..8949923509 100644 --- a/live-examples/js-examples/expressions/expressions-strict-equality.js +++ b/live-examples/js-examples/expressions/expressions-strict-equality.js @@ -4,7 +4,7 @@ console.log(1 === 1); console.log('hello' === 'hello'); // expected output: true -console.log('1' === 1); +console.log('1' === 1); // expected output: false console.log(0 === false); diff --git a/live-examples/js-examples/expressions/expressions-strict-inequality.js b/live-examples/js-examples/expressions/expressions-strict-inequality.js index f02b40b30b..c191b7ae71 100644 --- a/live-examples/js-examples/expressions/expressions-strict-inequality.js +++ b/live-examples/js-examples/expressions/expressions-strict-inequality.js @@ -4,7 +4,7 @@ console.log(1 !== 1); console.log('hello' !== 'hello'); // expected output: false -console.log('1' !== 1); +console.log('1' !== 1); // expected output: true console.log(0 !== false); diff --git a/live-examples/js-examples/expressions/expressions-subtraction-assignment.js b/live-examples/js-examples/expressions/expressions-subtraction-assignment.js index ed20eb3e60..93e9ff7676 100644 --- a/live-examples/js-examples/expressions/expressions-subtraction-assignment.js +++ b/live-examples/js-examples/expressions/expressions-subtraction-assignment.js @@ -1,7 +1,7 @@ let a = 2; -console.log(a -= 3); +console.log((a -= 3)); // expected output: -1 -console.log(a -= 'Hello'); +console.log((a -= 'Hello')); // expected output: NaN diff --git a/live-examples/js-examples/expressions/expressions-this.js b/live-examples/js-examples/expressions/expressions-this.js index f25a50b313..8dd759c6eb 100644 --- a/live-examples/js-examples/expressions/expressions-this.js +++ b/live-examples/js-examples/expressions/expressions-this.js @@ -1,8 +1,8 @@ const test = { prop: 42, - func: function() { + func: function () { return this.prop; - }, + } }; console.log(test.func()); diff --git a/live-examples/js-examples/expressions/expressions-unsigned-right-shift-assignment.js b/live-examples/js-examples/expressions/expressions-unsigned-right-shift-assignment.js index 6bcf96e5dc..5ae6b3a465 100644 --- a/live-examples/js-examples/expressions/expressions-unsigned-right-shift-assignment.js +++ b/live-examples/js-examples/expressions/expressions-unsigned-right-shift-assignment.js @@ -1,11 +1,11 @@ let a = 5; // 00000000000000000000000000000101 -a >>>= 2; // 00000000000000000000000000000001 +a >>>= 2; // 00000000000000000000000000000001 console.log(a); // expected output: 1 let b = -5; // -00000000000000000000000000000101 -b >>>= 2; // 00111111111111111111111111111110 +b >>>= 2; // 00111111111111111111111111111110 console.log(b); // expected output: 1073741822 diff --git a/live-examples/js-examples/expressions/expressions-unsigned-right-shift.js b/live-examples/js-examples/expressions/expressions-unsigned-right-shift.js index e98761cf35..5a84f0e527 100644 --- a/live-examples/js-examples/expressions/expressions-unsigned-right-shift.js +++ b/live-examples/js-examples/expressions/expressions-unsigned-right-shift.js @@ -1,6 +1,6 @@ -const a = 5; // 00000000000000000000000000000101 -const b = 2; // 00000000000000000000000000000010 -const c = -5; // 11111111111111111111111111111011 +const a = 5; // 00000000000000000000000000000101 +const b = 2; // 00000000000000000000000000000010 +const c = -5; // 11111111111111111111111111111011 console.log(a >>> b); // 00000000000000000000000000000001 // expected output: 1 diff --git a/live-examples/js-examples/expressions/expressions-voidoperator.js b/live-examples/js-examples/expressions/expressions-voidoperator.js index 8585cd5319..c9ca522222 100644 --- a/live-examples/js-examples/expressions/expressions-voidoperator.js +++ b/live-examples/js-examples/expressions/expressions-voidoperator.js @@ -5,9 +5,9 @@ console.log(output); void console.log('expression evaluated'); // expected output: "expression evaluated" -void function iife() { +void (function iife() { console.log('iife is executed'); -}(); +})(); // expected output: iife is executed void function test() { diff --git a/live-examples/js-examples/function/function-bind.js b/live-examples/js-examples/function/function-bind.js index e5e1022d9e..20a6117cc6 100644 --- a/live-examples/js-examples/function/function-bind.js +++ b/live-examples/js-examples/function/function-bind.js @@ -1,6 +1,6 @@ const module = { x: 42, - getX: function() { + getX: function () { return this.x; } }; diff --git a/live-examples/js-examples/function/function-name.js b/live-examples/js-examples/function/function-name.js index 89ed87b113..d4bcca9dc9 100644 --- a/live-examples/js-examples/function/function-name.js +++ b/live-examples/js-examples/function/function-name.js @@ -1,7 +1,7 @@ -const func1 = function() {}; +const func1 = function () {}; const object = { - func2: function() {} + func2: function () {} }; console.log(func1.name); diff --git a/live-examples/js-examples/functions/functions-arrow.js b/live-examples/js-examples/functions/functions-arrow.js index 2981924b2b..112e0317af 100644 --- a/live-examples/js-examples/functions/functions-arrow.js +++ b/live-examples/js-examples/functions/functions-arrow.js @@ -1,9 +1,4 @@ -const materials = [ - 'Hydrogen', - 'Helium', - 'Lithium', - 'Beryllium' -]; +const materials = ['Hydrogen', 'Helium', 'Lithium', 'Beryllium']; -console.log(materials.map(material => material.length)); +console.log(materials.map((material) => material.length)); // expected output: Array [8, 6, 7, 9] diff --git a/live-examples/js-examples/globalprops/globalprops-decodeuri.js b/live-examples/js-examples/globalprops/globalprops-decodeuri.js index 15a27119cf..45f406bd15 100644 --- a/live-examples/js-examples/globalprops/globalprops-decodeuri.js +++ b/live-examples/js-examples/globalprops/globalprops-decodeuri.js @@ -6,6 +6,7 @@ console.log(encoded); try { console.log(decodeURI(encoded)); // expected output: "https://mozilla.org/?x=шеллы" -} catch (e) { // catches a malformed URI +} catch (e) { + // catches a malformed URI console.error(e); } diff --git a/live-examples/js-examples/globalprops/globalprops-decodeuricomponent.js b/live-examples/js-examples/globalprops/globalprops-decodeuricomponent.js index 726f6e6468..4bc1534f0a 100644 --- a/live-examples/js-examples/globalprops/globalprops-decodeuricomponent.js +++ b/live-examples/js-examples/globalprops/globalprops-decodeuricomponent.js @@ -1,6 +1,6 @@ function containsEncodedComponents(x) { // ie ?,=,&,/ etc - return (decodeURI(x) !== decodeURIComponent(x)); + return decodeURI(x) !== decodeURIComponent(x); } console.log(containsEncodedComponents('%3Fx%3Dtest')); // ?x=test diff --git a/live-examples/js-examples/globalprops/globalprops-encodeuri.js b/live-examples/js-examples/globalprops/globalprops-encodeuri.js index 233198668d..45f406bd15 100644 --- a/live-examples/js-examples/globalprops/globalprops-encodeuri.js +++ b/live-examples/js-examples/globalprops/globalprops-encodeuri.js @@ -6,7 +6,7 @@ console.log(encoded); try { console.log(decodeURI(encoded)); // expected output: "https://mozilla.org/?x=шеллы" -} catch (e) { // catches a malformed URI +} catch (e) { + // catches a malformed URI console.error(e); } - diff --git a/live-examples/js-examples/globalprops/globalprops-infinity.js b/live-examples/js-examples/globalprops/globalprops-infinity.js index 48799689b7..f54dd620a6 100644 --- a/live-examples/js-examples/globalprops/globalprops-infinity.js +++ b/live-examples/js-examples/globalprops/globalprops-infinity.js @@ -1,7 +1,7 @@ const maxNumber = Math.pow(10, 1000); // max positive number if (maxNumber === Infinity) { - console.log('Let\'s call it Infinity!'); + console.log("Let's call it Infinity!"); // expected output: "Let's call it Infinity!" } diff --git a/live-examples/js-examples/globalprops/globalprops-parseint.js b/live-examples/js-examples/globalprops/globalprops-parseint.js index c677598f4b..a0e831937c 100644 --- a/live-examples/js-examples/globalprops/globalprops-parseint.js +++ b/live-examples/js-examples/globalprops/globalprops-parseint.js @@ -1,6 +1,8 @@ function roughScale(x, base) { const parsed = parseInt(x, base); - if (isNaN(parsed)) { return 0; } + if (isNaN(parsed)) { + return 0; + } return parsed * 100; } diff --git a/live-examples/js-examples/intl/intl-collator.js b/live-examples/js-examples/intl/intl-collator.js index 91acde2ead..e52257d9b7 100644 --- a/live-examples/js-examples/intl/intl-collator.js +++ b/live-examples/js-examples/intl/intl-collator.js @@ -4,5 +4,9 @@ console.log(['Z', 'a', 'z', 'ä'].sort(new Intl.Collator('de').compare)); console.log(['Z', 'a', 'z', 'ä'].sort(new Intl.Collator('sv').compare)); // expected output: ["a", "z", "Z", "ä"] -console.log(['Z', 'a', 'z', 'ä'].sort(new Intl.Collator('de', { caseFirst: 'upper' } ).compare)); +console.log( + ['Z', 'a', 'z', 'ä'].sort( + new Intl.Collator('de', { caseFirst: 'upper' }).compare + ) +); // expected output: ["a", "ä", "Z", "z"] diff --git a/live-examples/js-examples/intl/intl-datetimeformat-prototype-format.js b/live-examples/js-examples/intl/intl-datetimeformat-prototype-format.js index 0f7adbcbf5..bdd65b5294 100644 --- a/live-examples/js-examples/intl/intl-datetimeformat-prototype-format.js +++ b/live-examples/js-examples/intl/intl-datetimeformat-prototype-format.js @@ -1,4 +1,9 @@ -const options1 = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; +const options1 = { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric' +}; const date1 = new Date(2012, 5); const dateTimeFormat1 = new Intl.DateTimeFormat('sr-RS', options1); diff --git a/live-examples/js-examples/intl/intl-datetimeformat-prototype-formatrange.js b/live-examples/js-examples/intl/intl-datetimeformat-prototype-formatrange.js index 97d3a75787..09b680fb57 100644 --- a/live-examples/js-examples/intl/intl-datetimeformat-prototype-formatrange.js +++ b/live-examples/js-examples/intl/intl-datetimeformat-prototype-formatrange.js @@ -1,4 +1,9 @@ -const options1 = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; +const options1 = { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric' +}; const options2 = { year: '2-digit', month: 'numeric', day: 'numeric' }; const startDate = new Date(Date.UTC(2007, 0, 10, 10, 0, 0)); diff --git a/live-examples/js-examples/intl/intl-datetimeformat-prototype-formatrangetoparts.js b/live-examples/js-examples/intl/intl-datetimeformat-prototype-formatrangetoparts.js index 53f76f41b3..54a1ef702f 100644 --- a/live-examples/js-examples/intl/intl-datetimeformat-prototype-formatrangetoparts.js +++ b/live-examples/js-examples/intl/intl-datetimeformat-prototype-formatrangetoparts.js @@ -1,5 +1,5 @@ const startDate = new Date(Date.UTC(2007, 0, 10, 10, 0, 0)); // > 'Wed, 10 Jan 2007 10:00:00 GMT' -const endDate = new Date(Date.UTC(2007, 0, 10, 11, 0, 0)); // > 'Wed, 10 Jan 2007 11:00:00 GMT' +const endDate = new Date(Date.UTC(2007, 0, 10, 11, 0, 0)); // > 'Wed, 10 Jan 2007 11:00:00 GMT' const dateTimeFormat = new Intl.DateTimeFormat('en', { hour: 'numeric', diff --git a/live-examples/js-examples/intl/intl-datetimeformat-prototype-formattoparts.js b/live-examples/js-examples/intl/intl-datetimeformat-prototype-formattoparts.js index dd9eb93e89..7ce1d5faba 100644 --- a/live-examples/js-examples/intl/intl-datetimeformat-prototype-formattoparts.js +++ b/live-examples/js-examples/intl/intl-datetimeformat-prototype-formattoparts.js @@ -1,9 +1,14 @@ const date = new Date(2012, 5); -const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; +const options = { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric' +}; const dateTimeFormat = new Intl.DateTimeFormat('en-US', options); const parts = dateTimeFormat.formatToParts(date); -const partValues = parts.map(p => p.value); +const partValues = parts.map((p) => p.value); console.log(partValues); // expected output: "["Friday", ", ", "June", " ", "1", ", ", "2012"]" diff --git a/live-examples/js-examples/intl/intl-datetimeformat.js b/live-examples/js-examples/intl/intl-datetimeformat.js index ebab91a588..24bf85a7fb 100644 --- a/live-examples/js-examples/intl/intl-datetimeformat.js +++ b/live-examples/js-examples/intl/intl-datetimeformat.js @@ -10,5 +10,11 @@ console.log(new Intl.DateTimeFormat(['ban', 'id']).format(date)); // expected output: "20/12/2020" // Specify date and time format using "style" options (i.e. full, long, medium, short) -console.log(new Intl.DateTimeFormat('en-GB', { dateStyle: 'full', timeStyle: 'long', timeZone: 'Australia/Sydney' }).format(date)); +console.log( + new Intl.DateTimeFormat('en-GB', { + dateStyle: 'full', + timeStyle: 'long', + timeZone: 'Australia/Sydney' + }).format(date) +); // Expected output "Sunday, 20 December 2020 at 14:23:16 GMT+11" diff --git a/live-examples/js-examples/intl/intl-displaynames.js b/live-examples/js-examples/intl/intl-displaynames.js index d4adb42627..02064d2087 100644 --- a/live-examples/js-examples/intl/intl-displaynames.js +++ b/live-examples/js-examples/intl/intl-displaynames.js @@ -1,5 +1,7 @@ const regionNamesInEnglish = new Intl.DisplayNames(['en'], { type: 'region' }); -const regionNamesInTraditionalChinese = new Intl.DisplayNames(['zh-Hant'], { type: 'region' }); +const regionNamesInTraditionalChinese = new Intl.DisplayNames(['zh-Hant'], { + type: 'region' +}); console.log(regionNamesInEnglish.of('US')); // expected output: "United States" diff --git a/live-examples/js-examples/intl/intl-listformat-prototype-formattoparts.js b/live-examples/js-examples/intl/intl-listformat-prototype-formattoparts.js index 1ad1954a3d..ca61206f49 100644 --- a/live-examples/js-examples/intl/intl-listformat-prototype-formattoparts.js +++ b/live-examples/js-examples/intl/intl-listformat-prototype-formattoparts.js @@ -1,9 +1,15 @@ const vehicles = ['Motorcycle', 'Bus', 'Car']; -const formatterEn = new Intl.ListFormat('en', { style: 'long', type: 'conjunction' }); -const formatterFr = new Intl.ListFormat('fr', { style: 'long', type: 'conjunction' }); +const formatterEn = new Intl.ListFormat('en', { + style: 'long', + type: 'conjunction' +}); +const formatterFr = new Intl.ListFormat('fr', { + style: 'long', + type: 'conjunction' +}); -const partValuesEn = formatterEn.formatToParts(vehicles).map(p => p.value); -const partValuesFr = formatterFr.formatToParts(vehicles).map(p => p.value); +const partValuesEn = formatterEn.formatToParts(vehicles).map((p) => p.value); +const partValuesFr = formatterFr.formatToParts(vehicles).map((p) => p.value); console.log(partValuesEn); // expected output: "["Motorcycle", ", ", "Bus", ", and ", "Car"]" diff --git a/live-examples/js-examples/intl/intl-listformat.js b/live-examples/js-examples/intl/intl-listformat.js index dd84894d93..02c39212eb 100644 --- a/live-examples/js-examples/intl/intl-listformat.js +++ b/live-examples/js-examples/intl/intl-listformat.js @@ -1,15 +1,19 @@ const vehicles = ['Motorcycle', 'Bus', 'Car']; -const formatter = new Intl.ListFormat('en', { style: 'long', type: 'conjunction' }); +const formatter = new Intl.ListFormat('en', { + style: 'long', + type: 'conjunction' +}); console.log(formatter.format(vehicles)); // expected output: "Motorcycle, Bus, and Car" -const formatter2 = new Intl.ListFormat('de', { style: 'short', type: 'disjunction' }); +const formatter2 = new Intl.ListFormat('de', { + style: 'short', + type: 'disjunction' +}); console.log(formatter2.format(vehicles)); // expected output: "Motorcycle, Bus oder Car" const formatter3 = new Intl.ListFormat('en', { style: 'narrow', type: 'unit' }); console.log(formatter3.format(vehicles)); // expected output: "Motorcycle Bus Car" - - diff --git a/live-examples/js-examples/intl/intl-locale-prototype-tostring.js b/live-examples/js-examples/intl/intl-locale-prototype-tostring.js index ef2cf15fb6..e17059e090 100644 --- a/live-examples/js-examples/intl/intl-locale-prototype-tostring.js +++ b/live-examples/js-examples/intl/intl-locale-prototype-tostring.js @@ -1,5 +1,11 @@ -const french = new Intl.Locale('fr-Latn-FR', { calendar: 'gregory', hourCycle: 'h24' }); -const korean = new Intl.Locale('ko-Kore-KR', { numeric: true, caseFirst: 'upper' }); +const french = new Intl.Locale('fr-Latn-FR', { + calendar: 'gregory', + hourCycle: 'h24' +}); +const korean = new Intl.Locale('ko-Kore-KR', { + numeric: true, + caseFirst: 'upper' +}); console.log(french.toString()); // expected output: "fr-Latn-FR-u-ca-gregory-hc-h24" diff --git a/live-examples/js-examples/intl/intl-locale.js b/live-examples/js-examples/intl/intl-locale.js index f6c9f2664d..5b17bbba78 100644 --- a/live-examples/js-examples/intl/intl-locale.js +++ b/live-examples/js-examples/intl/intl-locale.js @@ -1,5 +1,8 @@ const korean = new Intl.Locale('ko', { - script: 'Kore', region: 'KR', hourCycle: 'h24', calendar: 'gregory' + script: 'Kore', + region: 'KR', + hourCycle: 'h24', + calendar: 'gregory' }); const japanese = new Intl.Locale('ja-Jpan-JP-u-ca-japanese-hc-h12'); diff --git a/live-examples/js-examples/intl/intl-numberformat-prototype-formattoparts.js b/live-examples/js-examples/intl/intl-numberformat-prototype-formattoparts.js index 31dd13d004..af8a8e093a 100644 --- a/live-examples/js-examples/intl/intl-numberformat-prototype-formattoparts.js +++ b/live-examples/js-examples/intl/intl-numberformat-prototype-formattoparts.js @@ -3,7 +3,7 @@ const options = { style: 'currency', currency: 'USD' }; const numberFormat = new Intl.NumberFormat('en-US', options); const parts = numberFormat.formatToParts(amount); -const partValues = parts.map(p => p.value); +const partValues = parts.map((p) => p.value); console.log(partValues); // expected output: "["$", "654", ",", "321", ".", "99"]" diff --git a/live-examples/js-examples/intl/intl-numberformat.js b/live-examples/js-examples/intl/intl-numberformat.js index f1d830b17c..96128a2ddd 100644 --- a/live-examples/js-examples/intl/intl-numberformat.js +++ b/live-examples/js-examples/intl/intl-numberformat.js @@ -1,12 +1,22 @@ const number = 123456.789; -console.log(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(number)); +console.log( + new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format( + number + ) +); // expected output: "123.456,79 €" // the Japanese yen doesn't use a minor unit -console.log(new Intl.NumberFormat('ja-JP', { style: 'currency', currency: 'JPY' }).format(number)); +console.log( + new Intl.NumberFormat('ja-JP', { style: 'currency', currency: 'JPY' }).format( + number + ) +); // expected output: "¥123,457" // limit to three significant digits -console.log(new Intl.NumberFormat('en-IN', { maximumSignificantDigits: 3 }).format(number)); +console.log( + new Intl.NumberFormat('en-IN', { maximumSignificantDigits: 3 }).format(number) +); // expected output: "1,23,000" diff --git a/live-examples/js-examples/intl/intl-segmenter-prototype-segment.js b/live-examples/js-examples/intl/intl-segmenter-prototype-segment.js index 40bc6888e1..97ef87dd1b 100644 --- a/live-examples/js-examples/intl/intl-segmenter-prototype-segment.js +++ b/live-examples/js-examples/intl/intl-segmenter-prototype-segment.js @@ -1,6 +1,8 @@ const string1 = 'Que ma joie demeure'; -const segmenterFrGrapheme = new Intl.Segmenter('fr', { granularity: 'grapheme' }); +const segmenterFrGrapheme = new Intl.Segmenter('fr', { + granularity: 'grapheme' +}); const graphemeSegments = segmenterFrGrapheme.segment(string1); console.log(Array.from(graphemeSegments)[0]); diff --git a/live-examples/js-examples/json/json-stringify.js b/live-examples/js-examples/json/json-stringify.js index 085d2ea5d6..0af7af4169 100644 --- a/live-examples/js-examples/json/json-stringify.js +++ b/live-examples/js-examples/json/json-stringify.js @@ -1,10 +1,12 @@ console.log(JSON.stringify({ x: 5, y: 6 })); // expected output: "{"x":5,"y":6}" -console.log(JSON.stringify([new Number(3), new String('false'), new Boolean(false)])); +console.log( + JSON.stringify([new Number(3), new String('false'), new Boolean(false)]) +); // expected output: "[3,"false",false]" -console.log(JSON.stringify({ x: [10, undefined, function(){}, Symbol('')] })); +console.log(JSON.stringify({ x: [10, undefined, function () {}, Symbol('')] })); // expected output: "{"x":[10,null,null,null]}" console.log(JSON.stringify(new Date(2006, 0, 2, 15, 4, 5))); diff --git a/live-examples/js-examples/map/map-prototype-foreach.js b/live-examples/js-examples/map/map-prototype-foreach.js index 04e95ccfce..333d9b1ec6 100644 --- a/live-examples/js-examples/map/map-prototype-foreach.js +++ b/live-examples/js-examples/map/map-prototype-foreach.js @@ -2,8 +2,11 @@ function logMapElements(value, key, map) { console.log(`m[${key}] = ${value}`); } -new Map([['foo', 3], ['bar', {}], ['baz', undefined]]) - .forEach(logMapElements); +new Map([ + ['foo', 3], + ['bar', {}], + ['baz', undefined] +]).forEach(logMapElements); // expected output: "m[foo] = 3" // expected output: "m[bar] = [object Object]" diff --git a/live-examples/js-examples/math/math-atan2.js b/live-examples/js-examples/math/math-atan2.js index ece8f71dae..b47d855493 100644 --- a/live-examples/js-examples/math/math-atan2.js +++ b/live-examples/js-examples/math/math-atan2.js @@ -1,5 +1,5 @@ function calcAngleDegrees(x, y) { - return Math.atan2(y, x) * 180 / Math.PI; + return (Math.atan2(y, x) * 180) / Math.PI; } console.log(calcAngleDegrees(5, 5)); diff --git a/live-examples/js-examples/math/math-ceil.js b/live-examples/js-examples/math/math-ceil.js index 972e50f498..5e73aefc9b 100644 --- a/live-examples/js-examples/math/math-ceil.js +++ b/live-examples/js-examples/math/math-ceil.js @@ -1,4 +1,4 @@ -console.log(Math.ceil(.95)); +console.log(Math.ceil(0.95)); // expected output: 1 console.log(Math.ceil(4)); diff --git a/live-examples/js-examples/math/math-e.js b/live-examples/js-examples/math/math-e.js index 2b47fab520..c14901f53c 100644 --- a/live-examples/js-examples/math/math-e.js +++ b/live-examples/js-examples/math/math-e.js @@ -1,11 +1,11 @@ function compoundOneYear(interestRate, currentVal) { - return currentVal * (Math.E ** interestRate); + return currentVal * Math.E ** interestRate; } console.log(Math.E); // expected output: 2.718281828459045 -console.log((1 + (1 / 1000000)) ** 1000000); +console.log((1 + 1 / 1000000) ** 1000000); // expected output: 2.718280469 (approximately) console.log(compoundOneYear(0.05, 100)); diff --git a/live-examples/js-examples/math/math-sqrt.js b/live-examples/js-examples/math/math-sqrt.js index 3d5de80dc4..9d822859c5 100644 --- a/live-examples/js-examples/math/math-sqrt.js +++ b/live-examples/js-examples/math/math-sqrt.js @@ -1,5 +1,5 @@ function calcHypotenuse(a, b) { - return (Math.sqrt((a * a) + (b * b))); + return Math.sqrt(a * a + b * b); } console.log(calcHypotenuse(3, 4)); diff --git a/live-examples/js-examples/math/math-tan.js b/live-examples/js-examples/math/math-tan.js index 8ff930635d..0672d31923 100644 --- a/live-examples/js-examples/math/math-tan.js +++ b/live-examples/js-examples/math/math-tan.js @@ -1,5 +1,5 @@ function getTanFromDegrees(degrees) { - return Math.tan(degrees * Math.PI / 180); + return Math.tan((degrees * Math.PI) / 180); } console.log(getTanFromDegrees(0)); diff --git a/live-examples/js-examples/number/number-max-value.js b/live-examples/js-examples/number/number-max-value.js index 133453b7cc..88f25c55d0 100644 --- a/live-examples/js-examples/number/number-max-value.js +++ b/live-examples/js-examples/number/number-max-value.js @@ -1,12 +1,12 @@ function multiply(x, y) { if (x * y > Number.MAX_VALUE) { - return ('Process as Infinity'); + return 'Process as Infinity'; } - return (x * y); + return x * y; } -console.log(multiply(1.7976931348623157e+308, 1)); +console.log(multiply(1.7976931348623157e308, 1)); // expected output: 1.7976931348623157e+308 -console.log(multiply(1.7976931348623157e+308, 2)); +console.log(multiply(1.7976931348623157e308, 2)); // expected output: "Process as Infinity" diff --git a/live-examples/js-examples/number/number-min-value.js b/live-examples/js-examples/number/number-min-value.js index 11eaacbb33..7db4cf262b 100644 --- a/live-examples/js-examples/number/number-min-value.js +++ b/live-examples/js-examples/number/number-min-value.js @@ -2,7 +2,7 @@ function divide(x, y) { if (x / y < Number.MIN_VALUE) { return 'Process as 0'; } - return (x / y); + return x / y; } console.log(divide(5e-324, 1)); diff --git a/live-examples/js-examples/number/number-parsefloat.js b/live-examples/js-examples/number/number-parsefloat.js index ef136d4b53..0cdd340cff 100644 --- a/live-examples/js-examples/number/number-parsefloat.js +++ b/live-examples/js-examples/number/number-parsefloat.js @@ -2,7 +2,7 @@ function circumference(r) { if (Number.isNaN(Number.parseFloat(r))) { return 0; } - return parseFloat(r) * 2.0 * Math.PI ; + return parseFloat(r) * 2.0 * Math.PI; } console.log(circumference('4.567abcdefgh')); diff --git a/live-examples/js-examples/number/number-tolocalestring.js b/live-examples/js-examples/number/number-tolocalestring.js index 29de443a73..a33d30d5c5 100644 --- a/live-examples/js-examples/number/number-tolocalestring.js +++ b/live-examples/js-examples/number/number-tolocalestring.js @@ -1,4 +1,4 @@ -function eArabic(x){ +function eArabic(x) { return x.toLocaleString('ar-EG'); } diff --git a/live-examples/js-examples/object/object-create.js b/live-examples/js-examples/object/object-create.js index 71da4aa4d6..01c62d2d56 100644 --- a/live-examples/js-examples/object/object-create.js +++ b/live-examples/js-examples/object/object-create.js @@ -1,6 +1,6 @@ const person = { isHuman: false, - printIntroduction: function() { + printIntroduction: function () { console.log(`My name is ${this.name}. Am I human? ${this.isHuman}`); } }; diff --git a/live-examples/js-examples/object/object-prototype-valueof.js b/live-examples/js-examples/object/object-prototype-valueof.js index f508c26a1f..f0cbfea703 100644 --- a/live-examples/js-examples/object/object-prototype-valueof.js +++ b/live-examples/js-examples/object/object-prototype-valueof.js @@ -2,7 +2,7 @@ function MyNumberType(n) { this.number = n; } -MyNumberType.prototype.valueOf = function() { +MyNumberType.prototype.valueOf = function () { return this.number; }; diff --git a/live-examples/js-examples/promise/promise-allsettled.js b/live-examples/js-examples/promise/promise-allsettled.js index d9ca89e9f3..053af00b1d 100644 --- a/live-examples/js-examples/promise/promise-allsettled.js +++ b/live-examples/js-examples/promise/promise-allsettled.js @@ -1,9 +1,12 @@ const promise1 = Promise.resolve(3); -const promise2 = new Promise((resolve, reject) => setTimeout(reject, 100, 'foo')); +const promise2 = new Promise((resolve, reject) => + setTimeout(reject, 100, 'foo') +); const promises = [promise1, promise2]; -Promise.allSettled(promises). - then((results) => results.forEach((result) => console.log(result.status))); +Promise.allSettled(promises).then((results) => + results.forEach((result) => console.log(result.status)) +); // expected output: // "fulfilled" diff --git a/live-examples/js-examples/promise/promise-constructor.js b/live-examples/js-examples/promise/promise-constructor.js index e8a9ac7c5a..9bad3cf8c3 100644 --- a/live-examples/js-examples/promise/promise-constructor.js +++ b/live-examples/js-examples/promise/promise-constructor.js @@ -11,4 +11,3 @@ promise1.then((value) => { console.log(promise1); // expected output: [object Promise] - diff --git a/live-examples/js-examples/promise/promise-resolve.js b/live-examples/js-examples/promise/promise-resolve.js index 89481201a1..df20959085 100644 --- a/live-examples/js-examples/promise/promise-resolve.js +++ b/live-examples/js-examples/promise/promise-resolve.js @@ -4,4 +4,3 @@ promise1.then((value) => { console.log(value); // expected output: 123 }); - diff --git a/live-examples/js-examples/promise/promise-then.js b/live-examples/js-examples/promise/promise-then.js index ee93852fc6..e25731ebaf 100644 --- a/live-examples/js-examples/promise/promise-then.js +++ b/live-examples/js-examples/promise/promise-then.js @@ -6,4 +6,3 @@ promise1.then((value) => { console.log(value); // expected output: "Success!" }); - diff --git a/live-examples/js-examples/proxyhandler/proxyhandler-apply.js b/live-examples/js-examples/proxyhandler/proxyhandler-apply.js index fb944e9b44..b0360f9b38 100644 --- a/live-examples/js-examples/proxyhandler/proxyhandler-apply.js +++ b/live-examples/js-examples/proxyhandler/proxyhandler-apply.js @@ -3,7 +3,7 @@ function sum(a, b) { } const handler = { - apply: function(target, thisArg, argumentsList) { + apply: function (target, thisArg, argumentsList) { console.log(`Calculate sum: ${argumentsList}`); // expected output: "Calculate sum: 1,2" diff --git a/live-examples/js-examples/proxyhandler/proxyhandler-defineproperty.js b/live-examples/js-examples/proxyhandler/proxyhandler-defineproperty.js index da0320406f..812d0d1a7b 100644 --- a/live-examples/js-examples/proxyhandler/proxyhandler-defineproperty.js +++ b/live-examples/js-examples/proxyhandler/proxyhandler-defineproperty.js @@ -14,5 +14,5 @@ function invariant(key, action) { const monster1 = {}; const proxy1 = new Proxy(monster1, handler1); -console.log(proxy1._secret = 'easily scared'); +console.log((proxy1._secret = 'easily scared')); // expected output: Error: Invalid attempt to define private "_secret" property diff --git a/live-examples/js-examples/proxyhandler/proxyhandler-get.js b/live-examples/js-examples/proxyhandler/proxyhandler-get.js index fdac0547cf..f018d3a84c 100644 --- a/live-examples/js-examples/proxyhandler/proxyhandler-get.js +++ b/live-examples/js-examples/proxyhandler/proxyhandler-get.js @@ -4,7 +4,7 @@ const monster1 = { }; const handler1 = { - get: function(target, prop, receiver) { + get: function (target, prop, receiver) { if (prop === 'secret') { return `${target.secret.substr(0, 4)} ... shhhh!`; } diff --git a/live-examples/js-examples/proxyhandler/proxyhandler-set.js b/live-examples/js-examples/proxyhandler/proxyhandler-set.js index 8bd40930dc..a8726ff45b 100644 --- a/live-examples/js-examples/proxyhandler/proxyhandler-set.js +++ b/live-examples/js-examples/proxyhandler/proxyhandler-set.js @@ -2,7 +2,7 @@ const monster1 = { eyeCount: 4 }; const handler1 = { set(obj, prop, value) { - if ((prop === 'eyeCount') && ((value % 2) !== 0)) { + if (prop === 'eyeCount' && value % 2 !== 0) { console.log('Monsters must have an even number of eyes'); } else { return Reflect.set(...arguments); diff --git a/live-examples/js-examples/reflect/reflect-apply.js b/live-examples/js-examples/reflect/reflect-apply.js index 808eac5e20..9b8aa7d287 100644 --- a/live-examples/js-examples/reflect/reflect-apply.js +++ b/live-examples/js-examples/reflect/reflect-apply.js @@ -1,10 +1,14 @@ console.log(Reflect.apply(Math.floor, undefined, [1.75])); // expected output: 1 -console.log(Reflect.apply(String.fromCharCode, undefined, [104, 101, 108, 108, 111])); +console.log( + Reflect.apply(String.fromCharCode, undefined, [104, 101, 108, 108, 111]) +); // expected output: "hello" -console.log(Reflect.apply(RegExp.prototype.exec, /ab/, ['confabulation']).index); +console.log( + Reflect.apply(RegExp.prototype.exec, /ab/, ['confabulation']).index +); // expected output: 4 console.log(Reflect.apply(''.charAt, 'ponies', [3])); diff --git a/live-examples/js-examples/regexp/regexp-groups-ranges.js b/live-examples/js-examples/regexp/regexp-groups-ranges.js index 54940de80b..28cd0e7e4f 100644 --- a/live-examples/js-examples/regexp/regexp-groups-ranges.js +++ b/live-examples/js-examples/regexp/regexp-groups-ranges.js @@ -1,5 +1,5 @@ const aliceExcerpt = 'The Caterpillar and Alice looked at each other'; -const regexpWithoutE = /\b[a-df-z]+\b/ig; +const regexpWithoutE = /\b[a-df-z]+\b/gi; console.log(aliceExcerpt.match(regexpWithoutE)); // expected output: Array ["and", "at"] diff --git a/live-examples/js-examples/regexp/regexp-lastindex.js b/live-examples/js-examples/regexp/regexp-lastindex.js index 18aa79d4af..5bbecfe1eb 100644 --- a/live-examples/js-examples/regexp/regexp-lastindex.js +++ b/live-examples/js-examples/regexp/regexp-lastindex.js @@ -1,4 +1,4 @@ -const regex1 = new RegExp( 'foo', 'g' ); +const regex1 = new RegExp('foo', 'g'); const str1 = 'table football, foosball'; regex1.test(str1); diff --git a/live-examples/js-examples/regexp/regexp-prototype-@@split.js b/live-examples/js-examples/regexp/regexp-prototype-@@split.js index d5246a4c79..bb34bf7f7a 100644 --- a/live-examples/js-examples/regexp/regexp-prototype-@@split.js +++ b/live-examples/js-examples/regexp/regexp-prototype-@@split.js @@ -1,7 +1,7 @@ class RegExp1 extends RegExp { [Symbol.split](str, limit) { const result = RegExp.prototype[Symbol.split].call(this, str, limit); - return result.map(x => `(${x})`); + return result.map((x) => `(${x})`); } } diff --git a/live-examples/js-examples/regexp/regexp-prototype-flags.js b/live-examples/js-examples/regexp/regexp-prototype-flags.js index c72f585d73..528d170a95 100644 --- a/live-examples/js-examples/regexp/regexp-prototype-flags.js +++ b/live-examples/js-examples/regexp/regexp-prototype-flags.js @@ -1,7 +1,7 @@ // outputs RegExp flags in alphabetical order -console.log(/foo/ig.flags); +console.log(/foo/gi.flags); // expected output: "gi" -console.log(/bar/myu.flags); +console.log(/bar/muy.flags); // expected output: "muy" diff --git a/live-examples/js-examples/regexp/regexp-prototype-source.js b/live-examples/js-examples/regexp/regexp-prototype-source.js index 6e7c435389..05d5d5e749 100644 --- a/live-examples/js-examples/regexp/regexp-prototype-source.js +++ b/live-examples/js-examples/regexp/regexp-prototype-source.js @@ -1,4 +1,4 @@ -const regex1 = /fooBar/ig; +const regex1 = /fooBar/gi; console.log(regex1.source); // expected output: "fooBar" diff --git a/live-examples/js-examples/statement/statement-async-for-in.js b/live-examples/js-examples/statement/statement-async-for-in.js index 569676501e..da6ac6969d 100644 --- a/live-examples/js-examples/statement/statement-async-for-in.js +++ b/live-examples/js-examples/statement/statement-async-for-in.js @@ -1,11 +1,8 @@ async function getFromList() { - const url = 'https://www.random.org/decimal-fractions/?num=1&dec=10&col=1&format=plain&rnd=new'; + const url = + 'https://www.random.org/decimal-fractions/?num=1&dec=10&col=1&format=plain&rnd=new'; - const arrayOfFetches = [ - doFetch(url), - doFetch(url), - doFetch(url) - ]; + const arrayOfFetches = [doFetch(url), doFetch(url), doFetch(url)]; console.log('Regular iterator: promise objects are expected.'); for (const item of arrayOfFetches) { diff --git a/live-examples/js-examples/statement/statement-async-function-asterisk.js b/live-examples/js-examples/statement/statement-async-function-asterisk.js index 0d14e0cca2..b1ad0f9485 100644 --- a/live-examples/js-examples/statement/statement-async-function-asterisk.js +++ b/live-examples/js-examples/statement/statement-async-function-asterisk.js @@ -6,14 +6,11 @@ async function* asyncGenerator() { const asyncGen = asyncGenerator(); -asyncGen.next() - .then(res => console.log(res.value)); +asyncGen.next().then((res) => console.log(res.value)); // expected output: 1 -asyncGen.next() - .then(res => console.log(res.value)); +asyncGen.next().then((res) => console.log(res.value)); // expected output: 2 -asyncGen.next() - .then(res => console.log(res.value)); +asyncGen.next().then((res) => console.log(res.value)); // expected output: 3 diff --git a/live-examples/js-examples/statement/statement-async.js b/live-examples/js-examples/statement/statement-async.js index 63fb385f3e..baa45f63ad 100644 --- a/live-examples/js-examples/statement/statement-async.js +++ b/live-examples/js-examples/statement/statement-async.js @@ -1,5 +1,5 @@ function resolveAfter2Seconds() { - return new Promise(resolve => { + return new Promise((resolve) => { setTimeout(() => { resolve('resolved'); }, 2000); diff --git a/live-examples/js-examples/statement/statement-default.js b/live-examples/js-examples/statement/statement-default.js index 94e0eb1715..6f5cde172e 100644 --- a/live-examples/js-examples/statement/statement-default.js +++ b/live-examples/js-examples/statement/statement-default.js @@ -8,5 +8,5 @@ switch (expr) { break; default: console.log(`Sorry, we are out of ${expr}.`); - // expected output: "Sorry, we are out of Pears." + // expected output: "Sorry, we are out of Pears." } diff --git a/live-examples/js-examples/statement/statement-empty.js b/live-examples/js-examples/statement/statement-empty.js index 5a666a5f40..bb84f96341 100644 --- a/live-examples/js-examples/statement/statement-empty.js +++ b/live-examples/js-examples/statement/statement-empty.js @@ -1,7 +1,7 @@ const array1 = [1, 2, 3]; // Assign all array values to 0 -for (let i = 0; i < array1.length; array1[i++] = 0) /* empty statement */; +for (let i = 0; i < array1.length; array1[i++] = 0 /* empty statement */); console.log(array1); // expected output: Array [0, 0, 0] diff --git a/live-examples/js-examples/statement/statement-forawaitof.js b/live-examples/js-examples/statement/statement-forawaitof.js index e91db92344..8e8b95cb5e 100644 --- a/live-examples/js-examples/statement/statement-forawaitof.js +++ b/live-examples/js-examples/statement/statement-forawaitof.js @@ -3,7 +3,7 @@ async function* foo() { yield 2; } -(async function() { +(async function () { for await (const num of foo()) { console.log(num); // expected output: 1 diff --git a/live-examples/js-examples/statement/statement-label.js b/live-examples/js-examples/statement/statement-label.js index c1af8a95ac..d401b62d80 100644 --- a/live-examples/js-examples/statement/statement-label.js +++ b/live-examples/js-examples/statement/statement-label.js @@ -1,7 +1,6 @@ let str = ''; -loop1: -for (let i = 0; i < 5; i++) { +loop1: for (let i = 0; i < 5; i++) { if (i === 1) { continue loop1; } diff --git a/live-examples/js-examples/string/string-at.js b/live-examples/js-examples/string/string-at.js index 5fe5afe8f2..7604b2c7d0 100644 --- a/live-examples/js-examples/string/string-at.js +++ b/live-examples/js-examples/string/string-at.js @@ -2,10 +2,14 @@ const sentence = 'The quick brown fox jumps over the lazy dog.'; let index = 5; -console.log(`Using an index of ${index} the character returned is ${sentence.at(index)}`); +console.log( + `Using an index of ${index} the character returned is ${sentence.at(index)}` +); // expected output: "Using an index of 5 the character returned is u" index = -4; -console.log(`Using an index of ${index} the character returned is ${sentence.at(index)}`); +console.log( + `Using an index of ${index} the character returned is ${sentence.at(index)}` +); // expected output: "Using an index of -4 the character returned is d" diff --git a/live-examples/js-examples/string/string-charcodeat.js b/live-examples/js-examples/string/string-charcodeat.js index cd34ee5d39..ce9b21969e 100644 --- a/live-examples/js-examples/string/string-charcodeat.js +++ b/live-examples/js-examples/string/string-charcodeat.js @@ -2,5 +2,9 @@ const sentence = 'The quick brown fox jumps over the lazy dog.'; const index = 4; -console.log(`The character code ${sentence.charCodeAt(index)} is equal to ${sentence.charAt(index)}`); +console.log( + `The character code ${sentence.charCodeAt( + index + )} is equal to ${sentence.charAt(index)}` +); // expected output: "The character code 113 is equal to q" diff --git a/live-examples/js-examples/string/string-fromcodepoint.js b/live-examples/js-examples/string/string-fromcodepoint.js index 657694f766..b657f2a012 100644 --- a/live-examples/js-examples/string/string-fromcodepoint.js +++ b/live-examples/js-examples/string/string-fromcodepoint.js @@ -1,2 +1,2 @@ -console.log(String.fromCodePoint(9731, 9733, 9842, 0x2F804)); +console.log(String.fromCodePoint(9731, 9733, 9842, 0x2f804)); // expected output: "☃★♲你" diff --git a/live-examples/js-examples/string/string-includes.js b/live-examples/js-examples/string/string-includes.js index 0d6ef2e8af..fd2b174064 100644 --- a/live-examples/js-examples/string/string-includes.js +++ b/live-examples/js-examples/string/string-includes.js @@ -2,5 +2,9 @@ const sentence = 'The quick brown fox jumps over the lazy dog.'; const word = 'fox'; -console.log(`The word "${word}" ${sentence.includes(word) ? 'is' : 'is not'} in the sentence`); +console.log( + `The word "${word}" ${ + sentence.includes(word) ? 'is' : 'is not' + } in the sentence` +); // expected output: "The word "fox" is in the sentence" diff --git a/live-examples/js-examples/string/string-indexof.js b/live-examples/js-examples/string/string-indexof.js index 49fa1ab01e..24e4680f8a 100644 --- a/live-examples/js-examples/string/string-indexof.js +++ b/live-examples/js-examples/string/string-indexof.js @@ -1,10 +1,18 @@ -const paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?'; +const paragraph = + 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?'; const searchTerm = 'dog'; const indexOfFirst = paragraph.indexOf(searchTerm); -console.log(`The index of the first "${searchTerm}" from the beginning is ${indexOfFirst}`); +console.log( + `The index of the first "${searchTerm}" from the beginning is ${indexOfFirst}` +); // expected output: "The index of the first "dog" from the beginning is 40" -console.log(`The index of the 2nd "${searchTerm}" is ${paragraph.indexOf(searchTerm, (indexOfFirst + 1))}`); +console.log( + `The index of the 2nd "${searchTerm}" is ${paragraph.indexOf( + searchTerm, + indexOfFirst + 1 + )}` +); // expected output: "The index of the 2nd "dog" is 52" diff --git a/live-examples/js-examples/string/string-iterator.js b/live-examples/js-examples/string/string-iterator.js index 63bf3ad9ed..ea728f7530 100644 --- a/live-examples/js-examples/string/string-iterator.js +++ b/live-examples/js-examples/string/string-iterator.js @@ -1,4 +1,4 @@ -const str = 'The quick red fox jumped over the lazy dog\'s back.'; +const str = "The quick red fox jumped over the lazy dog's back."; const iterator = str[Symbol.iterator](); let theChar = iterator.next(); diff --git a/live-examples/js-examples/string/string-lastindexof.js b/live-examples/js-examples/string/string-lastindexof.js index f4bbb71f6f..a00f52f71a 100644 --- a/live-examples/js-examples/string/string-lastindexof.js +++ b/live-examples/js-examples/string/string-lastindexof.js @@ -1,6 +1,11 @@ -const paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?'; +const paragraph = + 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?'; const searchTerm = 'dog'; -console.log(`The index of the first "${searchTerm}" from the end is ${paragraph.lastIndexOf(searchTerm)}`); +console.log( + `The index of the first "${searchTerm}" from the end is ${paragraph.lastIndexOf( + searchTerm + )}` +); // expected output: "The index of the first "dog" from the end is 52" diff --git a/live-examples/js-examples/string/string-raw.js b/live-examples/js-examples/string/string-raw.js index 87a0905969..064e63ba8d 100644 --- a/live-examples/js-examples/string/string-raw.js +++ b/live-examples/js-examples/string/string-raw.js @@ -1,4 +1,3 @@ - // Create a variable that uses a Windows // path without escaping the backslashes: const filePath = String.raw`C:\Development\profile\aboutme.html`; diff --git a/live-examples/js-examples/string/string-repeat.js b/live-examples/js-examples/string/string-repeat.js index 2d7e27142f..af705cb688 100644 --- a/live-examples/js-examples/string/string-repeat.js +++ b/live-examples/js-examples/string/string-repeat.js @@ -1,4 +1,4 @@ -const chorus = 'Because I\'m happy. '; +const chorus = "Because I'm happy. "; console.log(`Chorus lyrics for "Happy": ${chorus.repeat(27)}`); diff --git a/live-examples/js-examples/string/string-replace.js b/live-examples/js-examples/string/string-replace.js index 5f4440723c..92907148f3 100644 --- a/live-examples/js-examples/string/string-replace.js +++ b/live-examples/js-examples/string/string-replace.js @@ -1,9 +1,9 @@ -const p = 'The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?'; +const p = + 'The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?'; console.log(p.replace('dog', 'monkey')); // expected output: "The quick brown fox jumps over the lazy monkey. If the dog reacted, was it really lazy?" - const regex = /Dog/i; console.log(p.replace(regex, 'ferret')); // expected output: "The quick brown fox jumps over the lazy ferret. If the dog reacted, was it really lazy?" diff --git a/live-examples/js-examples/string/string-replaceall.js b/live-examples/js-examples/string/string-replaceall.js index 98d009023c..e1bdad4f7f 100644 --- a/live-examples/js-examples/string/string-replaceall.js +++ b/live-examples/js-examples/string/string-replaceall.js @@ -1,10 +1,10 @@ -const p = 'The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?'; +const p = + 'The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?'; console.log(p.replaceAll('dog', 'monkey')); // expected output: "The quick brown fox jumps over the lazy monkey. If the monkey reacted, was it really lazy?" - // global flag required when calling replaceAll with regex -const regex = /Dog/ig; +const regex = /Dog/gi; console.log(p.replaceAll(regex, 'ferret')); // expected output: "The quick brown fox jumps over the lazy ferret. If the ferret reacted, was it really lazy?" diff --git a/live-examples/js-examples/string/string-search.js b/live-examples/js-examples/string/string-search.js index 19e837af32..81c659d2c1 100644 --- a/live-examples/js-examples/string/string-search.js +++ b/live-examples/js-examples/string/string-search.js @@ -1,4 +1,5 @@ -const paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?'; +const paragraph = + 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?'; // any character that is not a word character or whitespace const regex = /[^\w\s]/g; diff --git a/live-examples/js-examples/symbol/symbol-matchall.js b/live-examples/js-examples/symbol/symbol-matchall.js index 21a383f261..94193ca021 100644 --- a/live-examples/js-examples/symbol/symbol-matchall.js +++ b/live-examples/js-examples/symbol/symbol-matchall.js @@ -2,5 +2,5 @@ const re = /[0-9]+/g; const str = '2016-01-02|2019-03-07'; const result = re[Symbol.matchAll](str); -console.log(Array.from(result, x => x[0])); +console.log(Array.from(result, (x) => x[0])); // expected output: Array ["2016", "01", "02", "2019", "03", "07"] diff --git a/live-examples/js-examples/symbol/symbol-species.js b/live-examples/js-examples/symbol/symbol-species.js index 26758d0db8..6c3d4abf6c 100644 --- a/live-examples/js-examples/symbol/symbol-species.js +++ b/live-examples/js-examples/symbol/symbol-species.js @@ -1,9 +1,11 @@ class Array1 extends Array { - static get [Symbol.species]() { return Array; } + static get [Symbol.species]() { + return Array; + } } const a = new Array1(1, 2, 3); -const mapped = a.map(x => x * x); +const mapped = a.map((x) => x * x); console.log(mapped instanceof Array1); // expected output: false diff --git a/live-examples/js-examples/symbol/symbol-split.js b/live-examples/js-examples/symbol/symbol-split.js index 36621ebce7..dbfa352b92 100644 --- a/live-examples/js-examples/symbol/symbol-split.js +++ b/live-examples/js-examples/symbol/symbol-split.js @@ -4,7 +4,9 @@ class Split1 { } [Symbol.split](string) { const index = string.indexOf(this.value); - return `${this.value}${string.substr(0, index)}/${string.substr(index + this.value.length)}`; + return `${this.value}${string.substr(0, index)}/${string.substr( + index + this.value.length + )}`; } } diff --git a/live-examples/js-examples/typedarray/typedarray-at.js b/live-examples/js-examples/typedarray/typedarray-at.js index 3cc0ed0404..b7075d170e 100644 --- a/live-examples/js-examples/typedarray/typedarray-at.js +++ b/live-examples/js-examples/typedarray/typedarray-at.js @@ -2,10 +2,14 @@ const int8 = new Int8Array([0, 10, -10, 20, -30, 40, -50]); let index = 1; -console.log(`Using an index of ${index} the item returned is ${int8.at(index)}`); +console.log( + `Using an index of ${index} the item returned is ${int8.at(index)}` +); // expected output: "Using an index of 1 the item returned is 10" index = -2; -console.log(`Using an index of ${index} the item returned is ${int8.at(index)}`); +console.log( + `Using an index of ${index} the item returned is ${int8.at(index)}` +); // expected output: "Using an index of -2 the item returned is 40" diff --git a/live-examples/js-examples/typedarray/typedarray-copywithin.js b/live-examples/js-examples/typedarray/typedarray-copywithin.js index c5072ea3e4..cca3d6d9fd 100644 --- a/live-examples/js-examples/typedarray/typedarray-copywithin.js +++ b/live-examples/js-examples/typedarray/typedarray-copywithin.js @@ -1,4 +1,4 @@ -const uint8 = new Uint8Array([ 1, 2, 3, 4, 5, 6, 7, 8 ]); +const uint8 = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); // (insert position, start position, end position) uint8.copyWithin(3, 1, 3); diff --git a/live-examples/js-examples/typedarray/typedarray-of.js b/live-examples/js-examples/typedarray/typedarray-of.js index aaadfa8e70..95104591ee 100644 --- a/live-examples/js-examples/typedarray/typedarray-of.js +++ b/live-examples/js-examples/typedarray/typedarray-of.js @@ -1,4 +1,4 @@ -let int16array = new Int16Array; +let int16array = new Int16Array(); int16array = Int16Array.of('10', '20', '30', '40', '50'); console.log(int16array); diff --git a/live-examples/js-examples/typedarray/typedarray-values.js b/live-examples/js-examples/typedarray/typedarray-values.js index ac1e398b39..1297365ff2 100644 --- a/live-examples/js-examples/typedarray/typedarray-values.js +++ b/live-examples/js-examples/typedarray/typedarray-values.js @@ -1,4 +1,4 @@ -const uint8 = new Uint8Array([ 10, 20, 30, 40, 50]); +const uint8 = new Uint8Array([10, 20, 30, 40, 50]); const array1 = uint8.values(); array1.next(); diff --git a/live-examples/webapi-examples/document/queryselector/js/document-queryselector.js b/live-examples/webapi-examples/document/queryselector/js/document-queryselector.js index 7788f72466..fcb5e22104 100644 --- a/live-examples/webapi-examples/document/queryselector/js/document-queryselector.js +++ b/live-examples/webapi-examples/document/queryselector/js/document-queryselector.js @@ -1,10 +1,10 @@ -(function() { - function getHeader() { - let documentRoot = getShadowRoot(); - return documentRoot.querySelector('header'); - } +(function () { + function getHeader() { + const documentRoot = getShadowRoot(); + return documentRoot.querySelector('header'); + } - let header = getHeader(); - console.log('header', header.textContent.trim()); - header.style.backgroundColor = '#b2ebf2'; + const header = getHeader(); + console.log('header', header.textContent.trim()); + header.style.backgroundColor = '#b2ebf2'; })(); diff --git a/package.json b/package.json index 4b42755d79..e8af81f1d4 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,11 @@ "main": "index.js", "scripts": { "build": "mdn-bob", + "fix:js": "eslint --fix .", + "lint:js": "eslint .", "start-server": "http-server -p 9090 ./docs", "start-watch": "chokidar '**/{*.js,*.css,*.html,*.json}' -i 'package.json' -i 'docs/**' -i 'node_modules/**' -i 'js/editor-*.js' -c 'yarn run build' --initial --silent", "start": "npm-run-all --parallel start-watch start-server", - "lint:js": "eslint ./live-examples/js-examples", - "lint:js:fix": "eslint --fix ./live-examples/js-examples", "test": "yarn lint:js" }, "keywords": [ @@ -34,16 +34,14 @@ "node": "^16.0.0 || >=18.0.0" }, "devDependencies": { - "@babel/core": "^7.20.2", - "@babel/eslint-parser": "^7.19.1", - "ajv": "^8.11.2", "chokidar-cli": "^3.0.0", "eslint": "^8.28.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", "http-server": "^14.1.1", "mdn-bob": "^2.2.0", "npm-run-all": "^4.1.5", "prettier": "^2.8.0", - "prettier-eslint": "^15.0.1", "prettier-stylelint": "^0.4.2", "stylelint": "^14.15.0" } diff --git a/yarn.lock b/yarn.lock index 35d65f2925..12215744ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,158 +2,18 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.1.0": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.1.1.tgz#7922fb0817bf3166d8d9e258c57477e3fd1c3610" - integrity sha512-Aolwjd7HSC2PyY0fDj/wA/EimQT4HfEnFYNp5s9CQlrdhyvWTtvZ5YzrUPu6R6/1jKiUlxu8bUhkdSnKHNAHMA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.0" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.18.6": +"@babel/code-frame@^7.0.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.20.0": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30" - integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ== - -"@babel/core@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" - integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.2" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-module-transforms" "^7.20.2" - "@babel/helpers" "^7.20.1" - "@babel/parser" "^7.20.2" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/eslint-parser@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.19.1.tgz#4f68f6b0825489e00a24b41b6a1ae35414ecd2f4" - integrity sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ== - dependencies: - "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" - eslint-visitor-keys "^2.1.0" - semver "^6.3.0" - -"@babel/generator@^7.20.1", "@babel/generator@^7.20.2": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.3.tgz#e58c9ae2f7bf7fdf4899160cf1e04400a82cd641" - integrity sha512-Wl5ilw2UD1+ZYprHVprxHZJCFeBWlzZYOovE4SDYLZnqCOD11j+0QzNeEWKLLTWM7nixrZEh7vNIyb76MyJg3A== - dependencies: - "@babel/types" "^7.20.2" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a" - integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== - dependencies: - "@babel/compat-data" "^7.20.0" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - semver "^6.3.0" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712" - integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - "@babel/helper-validator-identifier@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== -"@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helpers@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9" - integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg== - dependencies: - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.0" - "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -163,45 +23,6 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" - integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== - -"@babel/template@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" - integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" - -"@babel/traverse@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8" - integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.1" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.1" - "@babel/types" "^7.20.0" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" - integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - "@csstools/selector-specificity@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.0.2.tgz#1bfafe4b7ed0f3e4105837e056e0a89b108ebe36" @@ -241,53 +62,6 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@^3.0.3": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.4.tgz#b876e3feefb9c8d3aa84014da28b5e52a0640d72" - integrity sha512-cz8HFjOFfUBtvN+NXYSFMHYRdxZMaEl0XypVrhzxBgadKIXhIkRd8aMeHhmF56Sl7SuS8OnUpQ73/k9LE4VnLg== - -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.11" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec" - integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg== - -"@jridgewell/trace-mapping@^0.3.0": - version "0.3.4" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3" - integrity sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.13" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea" - integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": - version "5.1.1-v1" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" - integrity sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg== - dependencies: - eslint-scope "5.1.1" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -319,24 +93,6 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/eslint@^8.4.2": - version "8.4.2" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.2.tgz#48f2ac58ab9c631cb68845c3d956b28f79fad575" - integrity sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/json-schema@*": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - "@types/minimist@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" @@ -352,55 +108,6 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/prettier@^2.6.0": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.1.tgz#76e72d8a775eef7ce649c63c8acae1a0824bbaed" - integrity sha512-XFjFHmaLVifrAKaZ+EKghFHtHSUonyw8P2Qmy2/+osBnrKbH9UYtlK10zg8/kCt47MFilll/DEDKy3DHfJ0URw== - -"@typescript-eslint/parser@^5.10.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.21.0.tgz#6cb72673dbf3e1905b9c432175a3c86cdaf2071f" - integrity sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg== - dependencies: - "@typescript-eslint/scope-manager" "5.21.0" - "@typescript-eslint/types" "5.21.0" - "@typescript-eslint/typescript-estree" "5.21.0" - debug "^4.3.2" - -"@typescript-eslint/scope-manager@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz#a4b7ed1618f09f95e3d17d1c0ff7a341dac7862e" - integrity sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ== - dependencies: - "@typescript-eslint/types" "5.21.0" - "@typescript-eslint/visitor-keys" "5.21.0" - -"@typescript-eslint/types@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.21.0.tgz#8cdb9253c0dfce3f2ab655b9d36c03f72e684017" - integrity sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA== - -"@typescript-eslint/typescript-estree@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz#9f0c233e28be2540eaed3df050f0d54fb5aa52de" - integrity sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg== - dependencies: - "@typescript-eslint/types" "5.21.0" - "@typescript-eslint/visitor-keys" "5.21.0" - debug "^4.3.2" - globby "^11.0.4" - is-glob "^4.0.3" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/visitor-keys@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz#453fb3662409abaf2f8b1f65d515699c888dd8ae" - integrity sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA== - dependencies: - "@typescript-eslint/types" "5.21.0" - eslint-visitor-keys "^3.0.0" - JSONStream@^1.0.3: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -453,7 +160,7 @@ ajv@^6.0.1, ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1, ajv@^8.11.2: +ajv@^8.0.1: version "8.11.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.2.tgz#aecb20b50607acf2569b6382167b65a96008bb78" integrity sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg== @@ -860,16 +567,6 @@ browserslist@^2.11.3: caniuse-lite "^1.0.30000792" electron-to-chromium "^1.3.30" -browserslist@^4.21.3: - version "4.21.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a" - integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ== - dependencies: - caniuse-lite "^1.0.30001370" - electron-to-chromium "^1.4.202" - node-releases "^2.0.6" - update-browserslist-db "^1.0.5" - buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -957,11 +654,6 @@ caniuse-lite@^1.0.30000792, caniuse-lite@^1.0.30000805: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001112.tgz#0fffc3b934ff56ff0548c37bc9dad7d882bcf672" integrity sha512-J05RTQlqsatidif/38aN3PGULCLrg8OYQOlJUKbeYVzC2mGZkZLIztwRlB3MtrfLmawUmjFlNJvy/uhwniIe1Q== -caniuse-lite@^1.0.30001370: - version "1.0.30001399" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001399.tgz#1bf994ca375d7f33f8d01ce03b7d5139e8587873" - integrity sha512-4vQ90tMKS+FkvuVWS5/QY1+d805ODxZiKFzsU8o/RsVJz49ZSRR8EjykLJbqhzdPgadbX6wB538wOzle3JniRA== - capture-stack-trace@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" @@ -1146,11 +838,6 @@ commander@~2.13.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== -common-tags@^1.4.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" - integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1188,13 +875,6 @@ constants-browserify@~1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -convert-source-map@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" - integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== - dependencies: - safe-buffer "~5.1.1" - convert-source-map@~1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" @@ -1360,7 +1040,7 @@ debug@^3.0.0, debug@^3.0.1, debug@^3.1.1: dependencies: ms "^2.1.1" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: +debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1452,11 +1132,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -dlv@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" - integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -1533,11 +1208,6 @@ electron-to-chromium@^1.3.30: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.526.tgz#0e004899edf75afc172cce1b8189aac5dca646aa" integrity sha512-HiroW5ZbGwgT8kCnoEO8qnGjoTPzJxduvV/Vv/wH63eo2N6Zj3xT5fmmaSPAPUM05iN9/5fIEkIg3owTtV6QZg== -electron-to-chromium@^1.4.202: - version "1.4.250" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.250.tgz#e4535fc00d17b9a719bc688352c4a185acc2a347" - integrity sha512-KDLKcPEKPK+Q3/LdKX6knDzqyh8B82EaHccTYuGJR2qp1ymyGAo5HMH2x2OwDgzOPHlINSLIIeVhlFdq6aJgNA== - elliptic@^6.5.3: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -1622,11 +1292,6 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1637,15 +1302,19 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== + +eslint-plugin-prettier@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" + prettier-linter-helpers "^1.0.0" -eslint-scope@^7.0.0, eslint-scope@^7.1.1: +eslint-scope@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== @@ -1660,17 +1329,17 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: +eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.3.0: +eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.28.0, eslint@^8.7.0: +eslint@^8.28.0: version "8.28.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.28.0.tgz#81a680732634677cc890134bcdd9fdfea8e63d6e" integrity sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ== @@ -1715,7 +1384,7 @@ eslint@^8.28.0, eslint@^8.7.0: strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.0.0, espree@^9.4.0: +espree@^9.4.0: version "9.4.0" resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== @@ -1743,11 +1412,6 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - estraverse@^5.1.0, estraverse@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" @@ -1827,6 +1491,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -2010,11 +1679,6 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - get-assigned-identifiers@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz#6dbf411de648cbaf8d9169ebb0d2d576191e2ff1" @@ -2125,11 +1789,6 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - globals@^13.15.0: version "13.15.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" @@ -2137,7 +1796,7 @@ globals@^13.15.0: dependencies: type-fest "^0.20.2" -globby@^11.0.4, globby@^11.1.0: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -2810,11 +2469,6 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -2835,11 +2489,6 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - jsonfile@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" @@ -2965,7 +2614,7 @@ lodash.memoize@~3.0.3: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" integrity sha1-LcvSwofLwKVcxCMovQxzYVDVPj8= -lodash.merge@^4.6.0, lodash.merge@^4.6.2: +lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== @@ -2980,7 +2629,7 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash@^4.17.14, lodash@^4.17.21, lodash@^4.17.4: +lodash@^4.17.14, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -2992,19 +2641,6 @@ log-symbols@^2.0.0: dependencies: chalk "^2.0.1" -loglevel-colored-level-prefix@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/loglevel-colored-level-prefix/-/loglevel-colored-level-prefix-1.0.0.tgz#6a40218fdc7ae15fc76c3d0f3e676c465388603e" - integrity sha1-akAhj9x64V/HbD0PPmdsRlOIYD4= - dependencies: - chalk "^1.1.3" - loglevel "^1.4.1" - -loglevel@^1.4.1: - version "1.6.8" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" - integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA== - longest-streak@^2.0.1: version "2.0.4" resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.4.tgz#b8599957da5b5dab64dee3fe316fa774597d90e4" @@ -3321,11 +2957,6 @@ node-dir@0.1.17: dependencies: minimatch "^3.0.2" -node-releases@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" - integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== - normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -3906,25 +3537,12 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= -prettier-eslint@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-15.0.1.tgz#2543a43e9acec2a9767ad6458165ce81f353db9c" - integrity sha512-mGOWVHixSvpZWARqSDXbdtTL54mMBxc5oQYQ6RAqy8jecuNJBgN3t9E5a81G66F8x8fsKNiR1HWaBV66MJDOpg== - dependencies: - "@types/eslint" "^8.4.2" - "@types/prettier" "^2.6.0" - "@typescript-eslint/parser" "^5.10.0" - common-tags "^1.4.0" - dlv "^1.1.0" - eslint "^8.7.0" - indent-string "^4.0.0" - lodash.merge "^4.6.0" - loglevel-colored-level-prefix "^1.0.0" - prettier "^2.5.1" - pretty-format "^23.0.1" - require-relative "^0.8.7" - typescript "^4.5.4" - vue-eslint-parser "^8.0.1" +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" prettier-stylelint@^0.4.2: version "0.4.2" @@ -3951,19 +3569,11 @@ prettier@^1.7.0: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -prettier@^2.5.1, prettier@^2.8.0: +prettier@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9" integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA== -pretty-format@^23.0.1: - version "23.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" - integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -4297,11 +3907,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -require-relative@^0.8.7: - version "0.8.7" - resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" - integrity sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4= - requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -4400,12 +4005,7 @@ semver-diff@^2.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.2, semver@^7.3.5: +semver@^7.3.2: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -4986,11 +4586,6 @@ timers-browserify@^1.0.1: dependencies: process "~0.11.0" -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -5028,18 +4623,6 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== -tslib@^1.8.1: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== - -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tty-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" @@ -5077,11 +4660,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.5.4: - version "4.6.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c" - integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw== - uglify-es@3.3.9: version "3.3.9" resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" @@ -5198,14 +4776,6 @@ unzip-response@^2.0.1: resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= -update-browserslist-db@^1.0.5: - version "1.0.9" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18" - integrity sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - update-notifier@^2.2.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" @@ -5318,19 +4888,6 @@ vm-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -vue-eslint-parser@^8.0.1: - version "8.3.0" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz#5d31129a1b3dd89c0069ca0a1c88f970c360bd0d" - integrity sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g== - dependencies: - debug "^4.3.2" - eslint-scope "^7.0.0" - eslint-visitor-keys "^3.1.0" - espree "^9.0.0" - esquery "^1.4.0" - lodash "^4.17.21" - semver "^7.3.5" - wabt@^1.0.23: version "1.0.24" resolved "https://registry.yarnpkg.com/wabt/-/wabt-1.0.24.tgz#c02e0b5b4503b94feaf4a30a426ef01c1bea7c6c"