From 31a98b5a785f62f248a585a5ba18921ffef1fb22 Mon Sep 17 00:00:00 2001 From: Daniel Rozenberg Date: Fri, 17 Nov 2023 12:59:46 -0500 Subject: [PATCH] `amp lint --fix` --- build-system/common/ci.js | 40 +++++++++---------- .../eslint-rules/restrict-this-access.js | 4 +- build-system/task-runner/amp-task-runner.js | 4 +- build-system/tasks/get-zindex/js.js | 4 +- .../tasks/runtime-test/custom-launchers.js | 4 +- .../tasks/runtime-test/runtime-test-base.js | 8 ++-- .../0.1/amp-ad-network-doubleclick-impl.js | 6 +-- .../amp-animation/0.1/parsers/css-expr-ast.js | 28 ++++++------- .../0.1/parsers/keyframes-extractor.js | 4 +- .../amp-animation/0.1/web-animations.js | 4 +- extensions/amp-app-banner/1.0/component.js | 4 +- extensions/amp-carousel/0.1/slidescroll.js | 24 +++++------ extensions/amp-carousel/0.2/amp-carousel.js | 8 ++-- .../0.1/amp-date-countdown.js | 16 ++++---- .../amp-date-countdown/1.0/component.js | 16 ++++---- .../amp-date-picker/0.1/amp-date-picker.js | 12 +++--- .../amp-image-viewer/0.1/amp-image-viewer.js | 4 +- extensions/amp-next-page/0.1/amp-next-page.js | 8 ++-- .../amp-social-share/0.1/amp-social-share.js | 4 +- .../amp-truncate-text/0.1/binary-search.js | 8 ++-- src/amp-story-player/amp-story-player-impl.js | 4 +- .../bento-mega-menu/1.0/component/types.ts | 4 +- src/core/context/values.js | 4 +- src/custom-element.js | 4 +- src/friendly-iframe-embed.js | 4 +- src/preact/parse-props.js | 4 +- src/service/video-manager-impl.js | 4 +- src/style-installer.js | 4 +- src/utils/log.js | 4 +- testing/fake-dom.js | 4 +- 30 files changed, 125 insertions(+), 125 deletions(-) diff --git a/build-system/common/ci.js b/build-system/common/ci.js index e390db0b281e..f7556220248b 100644 --- a/build-system/common/ci.js +++ b/build-system/common/ci.js @@ -66,8 +66,8 @@ function isPullRequestBuild() { return isGithubActions ? env('GITHUB_EVENT_NAME') === 'pull_request' : isCircleci - ? !isCircleciPushBranch(env('CIRCLE_BRANCH')) - : false; + ? !isCircleciPushBranch(env('CIRCLE_BRANCH')) + : false; } /** @@ -78,8 +78,8 @@ function isPushBuild() { return isGithubActions ? env('GITHUB_EVENT_NAME') === 'push' : isCircleci - ? isCircleciPushBranch(env('CIRCLE_BRANCH')) - : false; + ? isCircleciPushBranch(env('CIRCLE_BRANCH')) + : false; } /** @@ -90,8 +90,8 @@ function ciPullRequestBranch() { return isGithubActions ? env('GITHUB_HEAD_REF') : isCircleci - ? env('CIRCLE_BRANCH') - : ''; + ? env('CIRCLE_BRANCH') + : ''; } /** @@ -102,8 +102,8 @@ function ciPullRequestSha() { return isGithubActions ? require(env('GITHUB_EVENT_PATH')).pull_request.head.sha : isCircleci - ? env('CIRCLE_SHA1') - : ''; + ? env('CIRCLE_SHA1') + : ''; } /** @@ -114,8 +114,8 @@ function ciPushBranch() { return isGithubActions ? env('GITHUB_REF') : isCircleci - ? env('CIRCLE_BRANCH') - : ''; + ? env('CIRCLE_BRANCH') + : ''; } /** @@ -126,8 +126,8 @@ function ciCommitSha() { return isGithubActions ? env('GITHUB_SHA') : isCircleci - ? env('CIRCLE_SHA1') - : ''; + ? env('CIRCLE_SHA1') + : ''; } /** @@ -138,8 +138,8 @@ function ciBuildId() { return isGithubActions ? env('GITHUB_RUN_ID') : isCircleci - ? env('CIRCLE_WORKFLOW_ID') - : ''; + ? env('CIRCLE_WORKFLOW_ID') + : ''; } /** @@ -150,8 +150,8 @@ function ciBuildUrl() { return isGithubActions ? `${env('GITHUB_SERVER_URL')}/${env('GITHUB_REPOSITORY')}/actions/runs/${env('GITHUB_RUN_ID')}` // prettier-ignore : isCircleci - ? `https://app.circleci.com/pipelines/workflows/${env('CIRCLE_WORKFLOW_ID')}` // prettier-ignore - : ''; + ? `https://app.circleci.com/pipelines/workflows/${env('CIRCLE_WORKFLOW_ID')}` // prettier-ignore + : ''; } /** @@ -162,8 +162,8 @@ function ciJobId() { return isGithubActions ? env('GITHUB_RUN_NUMBER') : isCircleci - ? env('CIRCLE_JOB') - : ''; + ? env('CIRCLE_JOB') + : ''; } /** @@ -200,8 +200,8 @@ function ciRepoSlug() { return isGithubActions ? env('GITHUB_REPOSITORY') : isCircleci - ? `${env('CIRCLE_PROJECT_USERNAME')}/${env('CIRCLE_PROJECT_REPONAME')}` - : ''; + ? `${env('CIRCLE_PROJECT_USERNAME')}/${env('CIRCLE_PROJECT_REPONAME')}` + : ''; } /** diff --git a/build-system/eslint-rules/restrict-this-access.js b/build-system/eslint-rules/restrict-this-access.js index d9a7862c7032..aefa4f3c2249 100644 --- a/build-system/eslint-rules/restrict-this-access.js +++ b/build-system/eslint-rules/restrict-this-access.js @@ -98,8 +98,8 @@ module.exports = function (context) { property.type === 'Identifier' ? property.name : property.type === 'Literal' - ? property.value - : null; + ? property.value + : null; if (!name) { context.report({ diff --git a/build-system/task-runner/amp-task-runner.js b/build-system/task-runner/amp-task-runner.js index 6ae4fc52d3c3..1c6550518d59 100644 --- a/build-system/task-runner/amp-task-runner.js +++ b/build-system/task-runner/amp-task-runner.js @@ -45,8 +45,8 @@ function getTime(start) { return mins !== 0 ? `${mins}m ${secs}s` : secs != 0 - ? `${secs}s` - : `${msecs}ms`; + ? `${secs}s` + : `${msecs}ms`; } /** diff --git a/build-system/tasks/get-zindex/js.js b/build-system/tasks/get-zindex/js.js index 2434adcfc2cb..a5fc418c21f3 100644 --- a/build-system/tasks/get-zindex/js.js +++ b/build-system/tasks/get-zindex/js.js @@ -120,8 +120,8 @@ async function getZindexJs(filename) { const name = types.isStringLiteral(key) ? key.value : types.isIdentifier(key) - ? key.name - : null; + ? key.name + : null; if (!name) { return; } diff --git a/build-system/tasks/runtime-test/custom-launchers.js b/build-system/tasks/runtime-test/custom-launchers.js index 3d4675ac57ba..bd96683d0aa1 100644 --- a/build-system/tasks/runtime-test/custom-launchers.js +++ b/build-system/tasks/runtime-test/custom-launchers.js @@ -29,8 +29,8 @@ const customLaunchers = { base: argv.headless ? 'ChromeHeadless' : argv.chrome_canary - ? 'ChromeCanary' - : 'Chrome', + ? 'ChromeCanary' + : 'Chrome', flags: argv.chrome_flags ? argv.chrome_flags.split(',').map((flag) => `--${flag}`) : DEFAULT_CHROME_FLAGS, diff --git a/build-system/tasks/runtime-test/runtime-test-base.js b/build-system/tasks/runtime-test/runtime-test-base.js index af0a9a7d643f..0a0bf0133449 100644 --- a/build-system/tasks/runtime-test/runtime-test-base.js +++ b/build-system/tasks/runtime-test/runtime-test-base.js @@ -109,10 +109,10 @@ class RuntimeTestConfig { const browser = argv.edge ? 'EdgeCustom' : argv.firefox - ? 'FirefoxCustom' - : argv.safari - ? 'SafariCustom' - : 'ChromeCustom'; + ? 'FirefoxCustom' + : argv.safari + ? 'SafariCustom' + : 'ChromeCustom'; Object.assign(this, {browsers: [browser], customLaunchers}); } diff --git a/extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js b/extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js index ff8ef69ccb10..a8e1d58e5364 100644 --- a/extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js +++ b/extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js @@ -743,9 +743,9 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A { this.initialSize_ = this.isFluidPrimaryRequest_ ? {width: 0, height: 0} : width && height - ? // width/height could be 'auto' in which case we fallback to measured. - {width, height} - : this.getIntersectionElementLayoutBox(); + ? // width/height could be 'auto' in which case we fallback to measured. + {width, height} + : this.getIntersectionElementLayoutBox(); this.jsonTargeting = tryParseJson(this.element.getAttribute('json')) || {}; this.adKey = this.generateAdKey_( `${this.initialSize_.width}x${this.initialSize_.height}` diff --git a/extensions/amp-animation/0.1/parsers/css-expr-ast.js b/extensions/amp-animation/0.1/parsers/css-expr-ast.js index c58e87b65efc..bd3389095b4d 100644 --- a/extensions/amp-animation/0.1/parsers/css-expr-ast.js +++ b/extensions/amp-animation/0.1/parsers/css-expr-ast.js @@ -193,10 +193,10 @@ export class CssConcatNode extends CssNode { opt_array instanceof CssConcatNode ? opt_array.array_ : Array.isArray(opt_array) - ? opt_array - : opt_array - ? [opt_array] - : []; + ? opt_array + : opt_array + ? [opt_array] + : []; /** @const @private {?Array} */ this.dimensions_ = opt_dimensions || null; } @@ -707,8 +707,8 @@ export function createPositionNode(value) { kw == 'left' || kw == 'right' ? 'w' : kw == 'top' || kw == 'bottom' - ? 'h' - : ''; + ? 'h' + : ''; dims[i] = dims[i + 1] = dim; } } @@ -815,14 +815,14 @@ export class CssTranslateNode extends CssFuncNode { suffix == '' ? ['w', 'h'] : suffix == 'x' - ? ['w'] - : suffix == 'y' - ? ['h'] - : suffix == 'z' - ? ['z'] - : suffix == '3d' - ? ['w', 'h', 'z'] - : null + ? ['w'] + : suffix == 'y' + ? ['h'] + : suffix == 'z' + ? ['z'] + : suffix == '3d' + ? ['w', 'h', 'z'] + : null ); /** @const @protected {string} */ this.suffix_ = suffix; diff --git a/extensions/amp-animation/0.1/parsers/keyframes-extractor.js b/extensions/amp-animation/0.1/parsers/keyframes-extractor.js index 59b95b2d351c..0a128060b518 100644 --- a/extensions/amp-animation/0.1/parsers/keyframes-extractor.js +++ b/extensions/amp-animation/0.1/parsers/keyframes-extractor.js @@ -129,8 +129,8 @@ function buildKeyframes(keyframesRule) { keyframeRule.keyText == 'from' ? 0 : keyframeRule.keyText == 'to' - ? 1 - : parseFloat(keyframeRule.keyText) / 100; + ? 1 + : parseFloat(keyframeRule.keyText) / 100; const {style} = keyframeRule; for (let j = 0; j < style.length; j++) { const styleName = style[j]; diff --git a/extensions/amp-animation/0.1/web-animations.js b/extensions/amp-animation/0.1/web-animations.js index dd0b5ff3f1bb..dff58ea30d84 100644 --- a/extensions/amp-animation/0.1/web-animations.js +++ b/extensions/amp-animation/0.1/web-animations.js @@ -1152,8 +1152,8 @@ class CssContextImpl { this.vars_ && this.vars_[varName] != undefined ? this.vars_[varName] : this.currentTarget_ - ? this.measure(this.currentTarget_, varName) - : null; + ? this.measure(this.currentTarget_, varName) + : null; if (rawValue == null || rawValue === '') { user().warn(TAG, `Variable not found: "${varName}"`); } diff --git a/extensions/amp-app-banner/1.0/component.js b/extensions/amp-app-banner/1.0/component.js index 9209deb0125e..d7d1bd2a0f92 100644 --- a/extensions/amp-app-banner/1.0/component.js +++ b/extensions/amp-app-banner/1.0/component.js @@ -114,8 +114,8 @@ export function BentoAppBanner(props) { const AppBannerForCurrentPlatform = platformUtils.isIos() ? AppBannerIOS : platformUtils.isAndroid() - ? AppBannerAndroid - : null; + ? AppBannerAndroid + : null; if (!AppBannerForCurrentPlatform) { logger.info( diff --git a/extensions/amp-carousel/0.1/slidescroll.js b/extensions/amp-carousel/0.1/slidescroll.js index fa183d63a642..b052c55dcf58 100644 --- a/extensions/amp-carousel/0.1/slidescroll.js +++ b/extensions/amp-carousel/0.1/slidescroll.js @@ -160,8 +160,8 @@ export class AmpSlideScroll extends AMP.BaseElement { .startsWith('10.3') ? true : this.isIos_ - ? false - : !isExperimentOn(this.win, 'amp-carousel-chrome-scroll-snap'); + ? false + : !isExperimentOn(this.win, 'amp-carousel-chrome-scroll-snap'); /** @private {boolean} */ this.hasFirstResizedOccured_ = false; @@ -567,8 +567,8 @@ export class AmpSlideScroll extends AMP.BaseElement { const timeout = this.hasNativeSnapPoints_ ? NATIVE_SNAP_TIMEOUT : this.isIos_ - ? IOS_CUSTOM_SNAP_TIMEOUT - : CUSTOM_SNAP_TIMEOUT; + ? IOS_CUSTOM_SNAP_TIMEOUT + : CUSTOM_SNAP_TIMEOUT; // Timer that detects scroll end and/or end of snap scroll. this.waitForScrollSettled_(timeout); @@ -693,15 +693,15 @@ export class AmpSlideScroll extends AMP.BaseElement { newIndex < 0 ? this.noOfSlides_ - 1 : newIndex >= this.noOfSlides_ - ? 0 - : newIndex; + ? 0 + : newIndex; } else { newIndex = newIndex < 0 ? 0 : newIndex >= this.noOfSlides_ - ? this.noOfSlides_ - 1 - : newIndex; + ? this.noOfSlides_ - 1 + : newIndex; } return newIndex; } @@ -779,8 +779,8 @@ export class AmpSlideScroll extends AMP.BaseElement { return currentIndex - 1 >= 0 ? currentIndex - 1 : this.shouldLoop_ - ? this.noOfSlides_ - 1 - : null; + ? this.noOfSlides_ - 1 + : null; } /** @@ -793,8 +793,8 @@ export class AmpSlideScroll extends AMP.BaseElement { return currentIndex + 1 < this.noOfSlides_ ? currentIndex + 1 : this.shouldLoop_ - ? 0 - : null; + ? 0 + : null; } /** diff --git a/extensions/amp-carousel/0.2/amp-carousel.js b/extensions/amp-carousel/0.2/amp-carousel.js index 07bda9795c06..7f6c3e586064 100644 --- a/extensions/amp-carousel/0.2/amp-carousel.js +++ b/extensions/amp-carousel/0.2/amp-carousel.js @@ -404,8 +404,8 @@ class AmpCarousel extends AMP.BaseElement { return currentIndex - 1 >= 0 ? currentIndex - 1 : this.element.hasAttribute('loop') - ? this.slides_.length - 1 - : null; + ? this.slides_.length - 1 + : null; } /** @@ -418,8 +418,8 @@ class AmpCarousel extends AMP.BaseElement { return currentIndex + 1 < this.slides_.length ? currentIndex + 1 : this.element.hasAttribute('loop') - ? 0 - : null; + ? 0 + : null; } /** diff --git a/extensions/amp-date-countdown/0.1/amp-date-countdown.js b/extensions/amp-date-countdown/0.1/amp-date-countdown.js index dca0fa8cc7d5..ee6e9a368b84 100644 --- a/extensions/amp-date-countdown/0.1/amp-date-countdown.js +++ b/extensions/amp-date-countdown/0.1/amp-date-countdown.js @@ -283,18 +283,18 @@ export class AmpDateCountdown extends AMP.BaseElement { TimeUnit[this.biggestUnit_] == TimeUnit.HOURS ? this.supportBackDate_(Math.floor(ms / MILLISECONDS_IN_HOUR)) : TimeUnit[this.biggestUnit_] < TimeUnit.HOURS - ? this.supportBackDate_( - Math.floor((ms % MILLISECONDS_IN_DAY) / MILLISECONDS_IN_HOUR) - ) - : 0; + ? this.supportBackDate_( + Math.floor((ms % MILLISECONDS_IN_DAY) / MILLISECONDS_IN_HOUR) + ) + : 0; const m = TimeUnit[this.biggestUnit_] == TimeUnit.MINUTES ? this.supportBackDate_(Math.floor(ms / MILLISECONDS_IN_MINUTE)) : TimeUnit[this.biggestUnit_] < TimeUnit.MINUTES - ? this.supportBackDate_( - Math.floor((ms % MILLISECONDS_IN_HOUR) / MILLISECONDS_IN_MINUTE) - ) - : 0; + ? this.supportBackDate_( + Math.floor((ms % MILLISECONDS_IN_HOUR) / MILLISECONDS_IN_MINUTE) + ) + : 0; const s = TimeUnit[this.biggestUnit_] == TimeUnit.SECONDS ? this.supportBackDate_(Math.floor(ms / MILLISECONDS_IN_SECOND)) diff --git a/extensions/amp-date-countdown/1.0/component.js b/extensions/amp-date-countdown/1.0/component.js index bb1783db6294..86252b03f61c 100644 --- a/extensions/amp-date-countdown/1.0/component.js +++ b/extensions/amp-date-countdown/1.0/component.js @@ -182,18 +182,18 @@ function getYDHMSFromMs(ms, biggestUnit, countUp) { TimeUnit[biggestUnit] == TimeUnit.HOURS ? supportBackDate(Math.floor(ms / MILLISECONDS_IN_HOUR)) : TimeUnit[biggestUnit] < TimeUnit.HOURS - ? supportBackDate( - Math.floor((ms % MILLISECONDS_IN_DAY) / MILLISECONDS_IN_HOUR) - ) - : 0; + ? supportBackDate( + Math.floor((ms % MILLISECONDS_IN_DAY) / MILLISECONDS_IN_HOUR) + ) + : 0; const m = TimeUnit[biggestUnit] == TimeUnit.MINUTES ? supportBackDate(Math.floor(ms / MILLISECONDS_IN_MINUTE)) : TimeUnit[biggestUnit] < TimeUnit.MINUTES - ? supportBackDate( - Math.floor((ms % MILLISECONDS_IN_HOUR) / MILLISECONDS_IN_MINUTE) - ) - : 0; + ? supportBackDate( + Math.floor((ms % MILLISECONDS_IN_HOUR) / MILLISECONDS_IN_MINUTE) + ) + : 0; const s = TimeUnit[biggestUnit] == TimeUnit.SECONDS ? supportBackDate(Math.floor(ms / MILLISECONDS_IN_SECOND)) diff --git a/extensions/amp-date-picker/0.1/amp-date-picker.js b/extensions/amp-date-picker/0.1/amp-date-picker.js index d4c56247daa9..09e0ddfe1af2 100644 --- a/extensions/amp-date-picker/0.1/amp-date-picker.js +++ b/extensions/amp-date-picker/0.1/amp-date-picker.js @@ -1084,10 +1084,10 @@ export class AmpDatePicker extends AMP.BaseElement { target === this.dateField_ ? 'date' : target === this.startDateField_ - ? 'startDate' - : target === this.endDateField_ - ? 'endDate' - : ''; + ? 'startDate' + : target === this.endDateField_ + ? 'endDate' + : ''; const moment = this.createMoment_(target.value); const isValid = moment && moment.isValid() && moment.year() > MIN_PICKER_YEAR; @@ -1461,8 +1461,8 @@ export class AmpDatePicker extends AMP.BaseElement { focusedInput === START_DATE ? this.startDateField_ : focusedInput === END_DATE - ? this.endDateField_ - : this.dateField_; + ? this.endDateField_ + : this.dateField_; this.updateDateFieldFocus_(focusedField, this.state_['isOpen']); this.setState_({ diff --git a/extensions/amp-image-viewer/0.1/amp-image-viewer.js b/extensions/amp-image-viewer/0.1/amp-image-viewer.js index c4cfe9a77776..6172425f98f5 100644 --- a/extensions/amp-image-viewer/0.1/amp-image-viewer.js +++ b/extensions/amp-image-viewer/0.1/amp-image-viewer.js @@ -171,8 +171,8 @@ export class AmpImageViewer extends AMP.BaseElement { const laidOutPromise = haveImg ? Promise.resolve() : img.tagName === 'IMG' - ? loadPromise(img) - : img.signals().whenSignal(CommonSignals_Enum.LOAD_END); + ? loadPromise(img) + : img.signals().whenSignal(CommonSignals_Enum.LOAD_END); if (!haveImg) { Services.ownersForDoc(this.element).scheduleLayout(this.element, img); diff --git a/extensions/amp-next-page/0.1/amp-next-page.js b/extensions/amp-next-page/0.1/amp-next-page.js index 92c018388027..9f7f1a32ca5d 100644 --- a/extensions/amp-next-page/0.1/amp-next-page.js +++ b/extensions/amp-next-page/0.1/amp-next-page.js @@ -70,10 +70,10 @@ export class AmpNextPage extends AMP.BaseElement { const prohibitedAttribute = element.hasAttribute('deep-parsing') ? 'deep-parsing' : element.hasAttribute('xssi-prefix') - ? 'xssi-prefix' - : element.hasAttribute('max-pages') - ? 'max-pages' - : null; + ? 'xssi-prefix' + : element.hasAttribute('max-pages') + ? 'max-pages' + : null; if (prohibitedAttribute) { this.unsupportedFeatureWarn_(prohibitedAttribute); } diff --git a/extensions/amp-social-share/0.1/amp-social-share.js b/extensions/amp-social-share/0.1/amp-social-share.js index 0d507410c52b..573c62fb2362 100644 --- a/extensions/amp-social-share/0.1/amp-social-share.js +++ b/extensions/amp-social-share/0.1/amp-social-share.js @@ -148,8 +148,8 @@ class AmpSocialShare extends AMP.BaseElement { this.platform_.isIos() && (isMailTo || isSms) ? '_top' : this.element.hasAttribute('data-target') - ? this.element.getAttribute('data-target') - : '_blank'; + ? this.element.getAttribute('data-target') + : '_blank'; if (isSms) { // http://stackoverflow.com/a/19126326 // This code path seems to be stable for both iOS and Android. diff --git a/extensions/amp-truncate-text/0.1/binary-search.js b/extensions/amp-truncate-text/0.1/binary-search.js index 7d888c04e2bf..06f6898953fe 100644 --- a/extensions/amp-truncate-text/0.1/binary-search.js +++ b/extensions/amp-truncate-text/0.1/binary-search.js @@ -83,9 +83,9 @@ export function binarySearch( const index = !isNaN(prefIndex) ? prefIndex : // If we stopped, high is either less than or equal to low. So if we have - // a high preference, actually return the current value of low. - preference == BinarySearchPreference.NEXT - ? low - : high; + // a high preference, actually return the current value of low. + preference == BinarySearchPreference.NEXT + ? low + : high; return -(index + 1); } diff --git a/src/amp-story-player/amp-story-player-impl.js b/src/amp-story-player/amp-story-player-impl.js index 4dd2ac2266d1..84305b72c72f 100644 --- a/src/amp-story-player/amp-story-player-impl.js +++ b/src/amp-story-player/amp-story-player-impl.js @@ -1142,8 +1142,8 @@ export class AmpStoryPlayer { story.distance === 0 ? STORY_POSITION_ENUM.CURRENT : story.idx > this.currentIdx_ - ? STORY_POSITION_ENUM.NEXT - : STORY_POSITION_ENUM.PREVIOUS; + ? STORY_POSITION_ENUM.NEXT + : STORY_POSITION_ENUM.PREVIOUS; requestAnimationFrame(() => { const {iframe} = story; diff --git a/src/bento/components/bento-mega-menu/1.0/component/types.ts b/src/bento/components/bento-mega-menu/1.0/component/types.ts index b1d74132d1bf..6318e9ebf506 100644 --- a/src/bento/components/bento-mega-menu/1.0/component/types.ts +++ b/src/bento/components/bento-mega-menu/1.0/component/types.ts @@ -5,8 +5,8 @@ export type AsProps = TAs extends keyof IntrinsicElements ? {as?: TAs} & IntrinsicElements[TAs] : TAs extends ComponentType - ? {as?: TAs} & TProps - : never; + ? {as?: TAs} & TProps + : never; export type AriaAttributes = { 'aria-expanded'?: boolean; diff --git a/src/core/context/values.js b/src/core/context/values.js index 7ada32a56c60..da68b3f86a53 100644 --- a/src/core/context/values.js +++ b/src/core/context/values.js @@ -576,8 +576,8 @@ export class Values { const parentValue = isDefined(used.parentValue) ? used.parentValue : recursive && !used.parentContextNode - ? defaultValue - : undefined; + ? defaultValue + : undefined; // Calculate the "used" value. let newValue = undefined; diff --git a/src/custom-element.js b/src/custom-element.js index 81264f7e3f78..934019619abf 100644 --- a/src/custom-element.js +++ b/src/custom-element.js @@ -653,8 +653,8 @@ function createBaseCustomElementClass(win, elementConnectedCallback) { this.readyState_ != ReadyState_Enum.MOUNTING ? this.readyState_ : this.implClass_.usesLoading(this) - ? ReadyState_Enum.LOADING - : ReadyState_Enum.MOUNTING + ? ReadyState_Enum.LOADING + : ReadyState_Enum.MOUNTING ); this.mounted_ = true; const result = this.impl_.mountCallback(signal); diff --git a/src/friendly-iframe-embed.js b/src/friendly-iframe-embed.js index 51842d6a19b2..c5acd03ed5ed 100644 --- a/src/friendly-iframe-embed.js +++ b/src/friendly-iframe-embed.js @@ -382,8 +382,8 @@ export class FriendlyIframeEmbed { this.signals_ = this.ampdoc ? this.ampdoc.signals() : this.host - ? this.host.signals() - : new Signals(); + ? this.host.signals() + : new Signals(); /** @private @const {!Deferred} */ this.renderComplete_ = new Deferred(); diff --git a/src/preact/parse-props.js b/src/preact/parse-props.js index 30abb6b8a555..fb16d5468f54 100644 --- a/src/preact/parse-props.js +++ b/src/preact/parse-props.js @@ -271,8 +271,8 @@ function parsePropDefs(Ctor, props, propDefs, element, mediaQueryProps) { def.type == 'number' ? parseFloat(value) : def.type == 'boolean' - ? parseBooleanAttribute(/** @type {string} */ (value)) - : value; + ? parseBooleanAttribute(/** @type {string} */ (value)) + : value; props[name] = v; } } diff --git a/src/service/video-manager-impl.js b/src/service/video-manager-impl.js index 3293ecee2662..8c831353c92e 100644 --- a/src/service/video-manager-impl.js +++ b/src/service/video-manager-impl.js @@ -1254,8 +1254,8 @@ export class AutoFullscreenManager { const pos = optPos ? dev().assertString(optPos) : bottom > vh - ? 'bottom' - : 'top'; + ? 'bottom' + : 'top'; return viewport.animateScrollIntoView(element, pos); }); } diff --git a/src/style-installer.js b/src/style-installer.js index 48231d557d15..58f5e71475dc 100644 --- a/src/style-installer.js +++ b/src/style-installer.js @@ -89,8 +89,8 @@ function insertStyleElement(cssRoot, cssText, isRuntimeCss, ext) { const key = isRuntimeCss ? 'amp-runtime' : isExtCss - ? `amp-extension=${ext}` - : null; + ? `amp-extension=${ext}` + : null; // Check if it has already been created or discovered. if (key) { diff --git a/src/utils/log.js b/src/utils/log.js index 1d1e55ada1f7..698401d39f70 100644 --- a/src/utils/log.js +++ b/src/utils/log.js @@ -611,8 +611,8 @@ export function dev() { logNum >= 3 ? LogLevel_Enum.FINE : logNum >= 2 - ? LogLevel_Enum.INFO - : LogLevel_Enum.OFF + ? LogLevel_Enum.INFO + : LogLevel_Enum.OFF )) ); } diff --git a/testing/fake-dom.js b/testing/fake-dom.js index 7af18c867737..044e59282b19 100644 --- a/testing/fake-dom.js +++ b/testing/fake-dom.js @@ -328,8 +328,8 @@ class EventListeners { typeof captureOrOpts == 'boolean' ? captureOrOpts : typeof captureOrOpts == 'object' - ? captureOrOpts.capture || false - : false, + ? captureOrOpts.capture || false + : false, options: typeof captureOrOpts == 'object' ? captureOrOpts : null, }; }