Skip to content

Commit 97d264d

Browse files
📦 Update linting devDependencies (ampproject#39627)
* 📦 Update linting devDependencies * `amp lint --fix` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Rozenberg <[email protected]>
1 parent 0de5055 commit 97d264d

File tree

32 files changed

+285
-285
lines changed

32 files changed

+285
-285
lines changed

Diff for: ‎build-system/common/ci.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ function isPullRequestBuild() {
6666
return isGithubActions
6767
? env('GITHUB_EVENT_NAME') === 'pull_request'
6868
: isCircleci
69-
? !isCircleciPushBranch(env('CIRCLE_BRANCH'))
70-
: false;
69+
? !isCircleciPushBranch(env('CIRCLE_BRANCH'))
70+
: false;
7171
}
7272

7373
/**
@@ -78,8 +78,8 @@ function isPushBuild() {
7878
return isGithubActions
7979
? env('GITHUB_EVENT_NAME') === 'push'
8080
: isCircleci
81-
? isCircleciPushBranch(env('CIRCLE_BRANCH'))
82-
: false;
81+
? isCircleciPushBranch(env('CIRCLE_BRANCH'))
82+
: false;
8383
}
8484

8585
/**
@@ -90,8 +90,8 @@ function ciPullRequestBranch() {
9090
return isGithubActions
9191
? env('GITHUB_HEAD_REF')
9292
: isCircleci
93-
? env('CIRCLE_BRANCH')
94-
: '';
93+
? env('CIRCLE_BRANCH')
94+
: '';
9595
}
9696

9797
/**
@@ -102,8 +102,8 @@ function ciPullRequestSha() {
102102
return isGithubActions
103103
? require(env('GITHUB_EVENT_PATH')).pull_request.head.sha
104104
: isCircleci
105-
? env('CIRCLE_SHA1')
106-
: '';
105+
? env('CIRCLE_SHA1')
106+
: '';
107107
}
108108

109109
/**
@@ -114,8 +114,8 @@ function ciPushBranch() {
114114
return isGithubActions
115115
? env('GITHUB_REF')
116116
: isCircleci
117-
? env('CIRCLE_BRANCH')
118-
: '';
117+
? env('CIRCLE_BRANCH')
118+
: '';
119119
}
120120

121121
/**
@@ -126,8 +126,8 @@ function ciCommitSha() {
126126
return isGithubActions
127127
? env('GITHUB_SHA')
128128
: isCircleci
129-
? env('CIRCLE_SHA1')
130-
: '';
129+
? env('CIRCLE_SHA1')
130+
: '';
131131
}
132132

133133
/**
@@ -138,8 +138,8 @@ function ciBuildId() {
138138
return isGithubActions
139139
? env('GITHUB_RUN_ID')
140140
: isCircleci
141-
? env('CIRCLE_WORKFLOW_ID')
142-
: '';
141+
? env('CIRCLE_WORKFLOW_ID')
142+
: '';
143143
}
144144

145145
/**
@@ -150,8 +150,8 @@ function ciBuildUrl() {
150150
return isGithubActions
151151
? `${env('GITHUB_SERVER_URL')}/${env('GITHUB_REPOSITORY')}/actions/runs/${env('GITHUB_RUN_ID')}` // prettier-ignore
152152
: isCircleci
153-
? `https://app.circleci.com/pipelines/workflows/${env('CIRCLE_WORKFLOW_ID')}` // prettier-ignore
154-
: '';
153+
? `https://app.circleci.com/pipelines/workflows/${env('CIRCLE_WORKFLOW_ID')}` // prettier-ignore
154+
: '';
155155
}
156156

157157
/**
@@ -162,8 +162,8 @@ function ciJobId() {
162162
return isGithubActions
163163
? env('GITHUB_RUN_NUMBER')
164164
: isCircleci
165-
? env('CIRCLE_JOB')
166-
: '';
165+
? env('CIRCLE_JOB')
166+
: '';
167167
}
168168

169169
/**
@@ -200,8 +200,8 @@ function ciRepoSlug() {
200200
return isGithubActions
201201
? env('GITHUB_REPOSITORY')
202202
: isCircleci
203-
? `${env('CIRCLE_PROJECT_USERNAME')}/${env('CIRCLE_PROJECT_REPONAME')}`
204-
: '';
203+
? `${env('CIRCLE_PROJECT_USERNAME')}/${env('CIRCLE_PROJECT_REPONAME')}`
204+
: '';
205205
}
206206

207207
/**

Diff for: ‎build-system/eslint-rules/restrict-this-access.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ module.exports = function (context) {
9898
property.type === 'Identifier'
9999
? property.name
100100
: property.type === 'Literal'
101-
? property.value
102-
: null;
101+
? property.value
102+
: null;
103103

104104
if (!name) {
105105
context.report({

Diff for: ‎build-system/task-runner/amp-task-runner.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ function getTime(start) {
4545
return mins !== 0
4646
? `${mins}m ${secs}s`
4747
: secs != 0
48-
? `${secs}s`
49-
: `${msecs}ms`;
48+
? `${secs}s`
49+
: `${msecs}ms`;
5050
}
5151

5252
/**

Diff for: ‎build-system/tasks/get-zindex/js.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ async function getZindexJs(filename) {
120120
const name = types.isStringLiteral(key)
121121
? key.value
122122
: types.isIdentifier(key)
123-
? key.name
124-
: null;
123+
? key.name
124+
: null;
125125
if (!name) {
126126
return;
127127
}

Diff for: ‎build-system/tasks/runtime-test/custom-launchers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const customLaunchers = {
2929
base: argv.headless
3030
? 'ChromeHeadless'
3131
: argv.chrome_canary
32-
? 'ChromeCanary'
33-
: 'Chrome',
32+
? 'ChromeCanary'
33+
: 'Chrome',
3434
flags: argv.chrome_flags
3535
? argv.chrome_flags.split(',').map((flag) => `--${flag}`)
3636
: DEFAULT_CHROME_FLAGS,

Diff for: ‎build-system/tasks/runtime-test/runtime-test-base.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ class RuntimeTestConfig {
109109
const browser = argv.edge
110110
? 'EdgeCustom'
111111
: argv.firefox
112-
? 'FirefoxCustom'
113-
: argv.safari
114-
? 'SafariCustom'
115-
: 'ChromeCustom';
112+
? 'FirefoxCustom'
113+
: argv.safari
114+
? 'SafariCustom'
115+
: 'ChromeCustom';
116116
Object.assign(this, {browsers: [browser], customLaunchers});
117117
}
118118

Diff for: ‎extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,9 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
743743
this.initialSize_ = this.isFluidPrimaryRequest_
744744
? {width: 0, height: 0}
745745
: width && height
746-
? // width/height could be 'auto' in which case we fallback to measured.
747-
{width, height}
748-
: this.getIntersectionElementLayoutBox();
746+
? // width/height could be 'auto' in which case we fallback to measured.
747+
{width, height}
748+
: this.getIntersectionElementLayoutBox();
749749
this.jsonTargeting = tryParseJson(this.element.getAttribute('json')) || {};
750750
this.adKey = this.generateAdKey_(
751751
`${this.initialSize_.width}x${this.initialSize_.height}`

Diff for: ‎extensions/amp-animation/0.1/parsers/css-expr-ast.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ export class CssConcatNode extends CssNode {
193193
opt_array instanceof CssConcatNode
194194
? opt_array.array_
195195
: Array.isArray(opt_array)
196-
? opt_array
197-
: opt_array
198-
? [opt_array]
199-
: [];
196+
? opt_array
197+
: opt_array
198+
? [opt_array]
199+
: [];
200200
/** @const @private {?Array<string>} */
201201
this.dimensions_ = opt_dimensions || null;
202202
}
@@ -707,8 +707,8 @@ export function createPositionNode(value) {
707707
kw == 'left' || kw == 'right'
708708
? 'w'
709709
: kw == 'top' || kw == 'bottom'
710-
? 'h'
711-
: '';
710+
? 'h'
711+
: '';
712712
dims[i] = dims[i + 1] = dim;
713713
}
714714
}
@@ -815,14 +815,14 @@ export class CssTranslateNode extends CssFuncNode {
815815
suffix == ''
816816
? ['w', 'h']
817817
: suffix == 'x'
818-
? ['w']
819-
: suffix == 'y'
820-
? ['h']
821-
: suffix == 'z'
822-
? ['z']
823-
: suffix == '3d'
824-
? ['w', 'h', 'z']
825-
: null
818+
? ['w']
819+
: suffix == 'y'
820+
? ['h']
821+
: suffix == 'z'
822+
? ['z']
823+
: suffix == '3d'
824+
? ['w', 'h', 'z']
825+
: null
826826
);
827827
/** @const @protected {string} */
828828
this.suffix_ = suffix;

Diff for: ‎extensions/amp-animation/0.1/parsers/keyframes-extractor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ function buildKeyframes(keyframesRule) {
129129
keyframeRule.keyText == 'from'
130130
? 0
131131
: keyframeRule.keyText == 'to'
132-
? 1
133-
: parseFloat(keyframeRule.keyText) / 100;
132+
? 1
133+
: parseFloat(keyframeRule.keyText) / 100;
134134
const {style} = keyframeRule;
135135
for (let j = 0; j < style.length; j++) {
136136
const styleName = style[j];

Diff for: ‎extensions/amp-animation/0.1/web-animations.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1152,8 +1152,8 @@ class CssContextImpl {
11521152
this.vars_ && this.vars_[varName] != undefined
11531153
? this.vars_[varName]
11541154
: this.currentTarget_
1155-
? this.measure(this.currentTarget_, varName)
1156-
: null;
1155+
? this.measure(this.currentTarget_, varName)
1156+
: null;
11571157
if (rawValue == null || rawValue === '') {
11581158
user().warn(TAG, `Variable not found: "${varName}"`);
11591159
}

Diff for: ‎extensions/amp-app-banner/1.0/component.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ export function BentoAppBanner(props) {
114114
const AppBannerForCurrentPlatform = platformUtils.isIos()
115115
? AppBannerIOS
116116
: platformUtils.isAndroid()
117-
? AppBannerAndroid
118-
: null;
117+
? AppBannerAndroid
118+
: null;
119119

120120
if (!AppBannerForCurrentPlatform) {
121121
logger.info(

Diff for: ‎extensions/amp-carousel/0.1/slidescroll.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ export class AmpSlideScroll extends AMP.BaseElement {
160160
.startsWith('10.3')
161161
? true
162162
: this.isIos_
163-
? false
164-
: !isExperimentOn(this.win, 'amp-carousel-chrome-scroll-snap');
163+
? false
164+
: !isExperimentOn(this.win, 'amp-carousel-chrome-scroll-snap');
165165

166166
/** @private {boolean} */
167167
this.hasFirstResizedOccured_ = false;
@@ -567,8 +567,8 @@ export class AmpSlideScroll extends AMP.BaseElement {
567567
const timeout = this.hasNativeSnapPoints_
568568
? NATIVE_SNAP_TIMEOUT
569569
: this.isIos_
570-
? IOS_CUSTOM_SNAP_TIMEOUT
571-
: CUSTOM_SNAP_TIMEOUT;
570+
? IOS_CUSTOM_SNAP_TIMEOUT
571+
: CUSTOM_SNAP_TIMEOUT;
572572
// Timer that detects scroll end and/or end of snap scroll.
573573
this.waitForScrollSettled_(timeout);
574574

@@ -693,15 +693,15 @@ export class AmpSlideScroll extends AMP.BaseElement {
693693
newIndex < 0
694694
? this.noOfSlides_ - 1
695695
: newIndex >= this.noOfSlides_
696-
? 0
697-
: newIndex;
696+
? 0
697+
: newIndex;
698698
} else {
699699
newIndex =
700700
newIndex < 0
701701
? 0
702702
: newIndex >= this.noOfSlides_
703-
? this.noOfSlides_ - 1
704-
: newIndex;
703+
? this.noOfSlides_ - 1
704+
: newIndex;
705705
}
706706
return newIndex;
707707
}
@@ -779,8 +779,8 @@ export class AmpSlideScroll extends AMP.BaseElement {
779779
return currentIndex - 1 >= 0
780780
? currentIndex - 1
781781
: this.shouldLoop_
782-
? this.noOfSlides_ - 1
783-
: null;
782+
? this.noOfSlides_ - 1
783+
: null;
784784
}
785785

786786
/**
@@ -793,8 +793,8 @@ export class AmpSlideScroll extends AMP.BaseElement {
793793
return currentIndex + 1 < this.noOfSlides_
794794
? currentIndex + 1
795795
: this.shouldLoop_
796-
? 0
797-
: null;
796+
? 0
797+
: null;
798798
}
799799

800800
/**

Diff for: ‎extensions/amp-carousel/0.2/amp-carousel.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,8 @@ class AmpCarousel extends AMP.BaseElement {
404404
return currentIndex - 1 >= 0
405405
? currentIndex - 1
406406
: this.element.hasAttribute('loop')
407-
? this.slides_.length - 1
408-
: null;
407+
? this.slides_.length - 1
408+
: null;
409409
}
410410

411411
/**
@@ -418,8 +418,8 @@ class AmpCarousel extends AMP.BaseElement {
418418
return currentIndex + 1 < this.slides_.length
419419
? currentIndex + 1
420420
: this.element.hasAttribute('loop')
421-
? 0
422-
: null;
421+
? 0
422+
: null;
423423
}
424424

425425
/**

Diff for: ‎extensions/amp-date-countdown/0.1/amp-date-countdown.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -283,18 +283,18 @@ export class AmpDateCountdown extends AMP.BaseElement {
283283
TimeUnit[this.biggestUnit_] == TimeUnit.HOURS
284284
? this.supportBackDate_(Math.floor(ms / MILLISECONDS_IN_HOUR))
285285
: TimeUnit[this.biggestUnit_] < TimeUnit.HOURS
286-
? this.supportBackDate_(
287-
Math.floor((ms % MILLISECONDS_IN_DAY) / MILLISECONDS_IN_HOUR)
288-
)
289-
: 0;
286+
? this.supportBackDate_(
287+
Math.floor((ms % MILLISECONDS_IN_DAY) / MILLISECONDS_IN_HOUR)
288+
)
289+
: 0;
290290
const m =
291291
TimeUnit[this.biggestUnit_] == TimeUnit.MINUTES
292292
? this.supportBackDate_(Math.floor(ms / MILLISECONDS_IN_MINUTE))
293293
: TimeUnit[this.biggestUnit_] < TimeUnit.MINUTES
294-
? this.supportBackDate_(
295-
Math.floor((ms % MILLISECONDS_IN_HOUR) / MILLISECONDS_IN_MINUTE)
296-
)
297-
: 0;
294+
? this.supportBackDate_(
295+
Math.floor((ms % MILLISECONDS_IN_HOUR) / MILLISECONDS_IN_MINUTE)
296+
)
297+
: 0;
298298
const s =
299299
TimeUnit[this.biggestUnit_] == TimeUnit.SECONDS
300300
? this.supportBackDate_(Math.floor(ms / MILLISECONDS_IN_SECOND))

0 commit comments

Comments
 (0)