diff --git a/js/src/carousel.js b/js/src/carousel.js index b14cbd1a23..fe53d583a9 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -284,11 +284,9 @@ class Carousel extends BaseComponent { const move = event => { // ensure swiping with one touch and not pinching - if (event.touches && event.touches.length > 1) { - this.touchDeltaX = 0 - } else { - this.touchDeltaX = event.touches[0].clientX - this.touchStartX - } + this.touchDeltaX = event.touches && event.touches.length > 1 ? + 0 : + event.touches[0].clientX - this.touchStartX } const end = event => { diff --git a/package-lock.json b/package-lock.json index 5b9ff14462..982df76160 100644 --- a/package-lock.json +++ b/package-lock.json @@ -103,9 +103,9 @@ } }, "@babel/eslint-parser": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.13.8.tgz", - "integrity": "sha512-XewKkiyukrGzMeqToXJQk6hjg2veI9SNQElGzAoAjKxYCLbgcVX4KA2WhoyqMon9N4RMdCZhNTJNOBcp9spsiw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.13.10.tgz", + "integrity": "sha512-/I1HQ3jGPhIpeBFeI3wO9WwWOnBYpuR0pX0KlkdGcRQAVX9prB/FCS2HBpL7BiFbzhny1YCiBH8MTZD2jJa7Hg==", "dev": true, "requires": { "eslint-scope": "5.1.0", @@ -3928,26 +3928,32 @@ } }, "eslint-plugin-unicorn": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-28.0.2.tgz", - "integrity": "sha512-k4AoFP7n8/oq6lBXkdc9Flid6vw2B8j7aXFCxgzJCyKvmaKrCUFb1TFPhG9eSJQFZowqmymMPRtl8oo9NKLUbw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-29.0.0.tgz", + "integrity": "sha512-R9jGLKb2p6LuOixviByGlH2mkfY72EBELXAPeUufveebN0M2Woa7B7dUO3gN2xPn/+eGjrIm4I2u7dDtr9G4iA==", "dev": true, "requires": { - "ci-info": "^2.0.0", + "ci-info": "^3.1.1", "clean-regexp": "^1.0.0", - "eslint-template-visitor": "^2.2.2", + "eslint-template-visitor": "^2.3.2", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", "import-modules": "^2.1.0", "lodash": "^4.17.20", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.22", + "regexp-tree": "^0.1.23", "reserved-words": "^0.1.2", "safe-regex": "^2.1.1", "semver": "^7.3.4" }, "dependencies": { + "ci-info": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.1.1.tgz", + "integrity": "sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==", + "dev": true + }, "safe-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", @@ -3958,9 +3964,9 @@ } }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" diff --git a/package.json b/package.json index 4f2ef20c2a..c1cdc87278 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "eslint": "^7.22.0", "eslint-config-xo": "^0.35.0", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-unicorn": "^28.0.2", + "eslint-plugin-unicorn": "^29.0.0", "find-unused-sass-variables": "^3.1.0", "glob": "^7.1.6", "globby": "^11.0.3",