Skip to content

Commit 73c9f0d

Browse files
committed
Fix formating issues after eslint update
1 parent 4f08663 commit 73c9f0d

24 files changed

+87
-105
lines changed

.eslintrc

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,7 @@
2525
},
2626
"extends": ["eslint:recommended"],
2727
"rules": {
28-
"comma-dangle": [
29-
"error",
30-
{
31-
"arrays": "always-multiline",
32-
"objects": "always-multiline",
33-
"imports": "always-multiline",
34-
"exports": "always-multiline",
35-
"functions": "never"
36-
}
37-
],
28+
"comma-dangle": ["error", "always-multiline"],
3829
"indent": ["error", 2],
3930
"no-invalid-this": "off",
4031
"max-len": [
@@ -65,16 +56,7 @@
6556
"@typescript-eslint/explicit-module-boundary-types": "off",
6657
"@typescript-eslint/ban-ts-comment": "off",
6758
"@typescript-eslint/camelcase": "off",
68-
"comma-dangle": [
69-
"error",
70-
{
71-
"arrays": "always-multiline",
72-
"objects": "always-multiline",
73-
"imports": "always-multiline",
74-
"exports": "always-multiline",
75-
"functions": "never"
76-
}
77-
],
59+
"comma-dangle": ["error", "always-multiline"],
7860
"indent": ["error", 2],
7961
"node/no-missing-import": "off",
8062
"node/no-unsupported-features/es-syntax": "off",

src/attribution/onCLS.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ const attributeCLS = (metric: CLSMetric): void => {
7878
*/
7979
export const onCLS = (
8080
onReport: CLSReportCallbackWithAttribution,
81-
opts?: ReportOpts
81+
opts?: ReportOpts,
8282
) => {
8383
unattributedOnCLS(
8484
((metric: CLSMetricWithAttribution) => {
8585
attributeCLS(metric);
8686
onReport(metric);
8787
}) as CLSReportCallback,
88-
opts
88+
opts,
8989
);
9090
};

src/attribution/onFCP.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ const attributeFCP = (metric: FCPMetric): void => {
6161
*/
6262
export const onFCP = (
6363
onReport: FCPReportCallbackWithAttribution,
64-
opts?: ReportOpts
64+
opts?: ReportOpts,
6565
) => {
6666
unattributedOnFCP(
6767
((metric: FCPMetricWithAttribution) => {
6868
attributeFCP(metric);
6969
onReport(metric);
7070
}) as FCPReportCallback,
71-
opts
71+
opts,
7272
);
7373
};

src/attribution/onFID.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ const attributeFID = (metric: FIDMetric): void => {
4747
*/
4848
export const onFID = (
4949
onReport: FIDReportCallbackWithAttribution,
50-
opts?: ReportOpts
50+
opts?: ReportOpts,
5151
) => {
5252
unattributedOnFID(
5353
((metric: FIDMetricWithAttribution) => {
5454
attributeFID(metric);
5555
onReport(metric);
5656
}) as FIDReportCallback,
57-
opts
57+
opts,
5858
);
5959
};

src/attribution/onINP.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ const attributeINP = (metric: INPMetric): void => {
7979
*/
8080
export const onINP = (
8181
onReport: INPReportCallbackWithAttribution,
82-
opts?: ReportOpts
82+
opts?: ReportOpts,
8383
) => {
8484
unattributedOnINP(
8585
((metric: INPMetricWithAttribution) => {
8686
attributeINP(metric);
8787
onReport(metric);
8888
}) as INPReportCallback,
89-
opts
89+
opts,
9090
);
9191
};

src/attribution/onLCP.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ const attributeLCP = (metric: LCPMetric) => {
4747
lcpResourceEntry
4848
? (lcpResourceEntry.requestStart || lcpResourceEntry.startTime) -
4949
activationStart
50-
: 0
50+
: 0,
5151
);
5252
const lcpResponseEnd = Math.max(
5353
lcpRequestStart,
54-
lcpResourceEntry ? lcpResourceEntry.responseEnd - activationStart : 0
54+
lcpResourceEntry ? lcpResourceEntry.responseEnd - activationStart : 0,
5555
);
5656
const lcpRenderTime = Math.max(
5757
lcpResponseEnd,
58-
lcpEntry ? lcpEntry.startTime - activationStart : 0
58+
lcpEntry ? lcpEntry.startTime - activationStart : 0,
5959
);
6060

6161
const attribution: LCPAttribution = {
@@ -102,13 +102,13 @@ const attributeLCP = (metric: LCPMetric) => {
102102
*/
103103
export const onLCP = (
104104
onReport: LCPReportCallbackWithAttribution,
105-
opts?: ReportOpts
105+
opts?: ReportOpts,
106106
) => {
107107
unattributedOnLCP(
108108
((metric: LCPMetricWithAttribution) => {
109109
attributeLCP(metric);
110110
onReport(metric);
111111
}) as LCPReportCallback,
112-
opts
112+
opts,
113113
);
114114
};

src/attribution/onTTFB.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ const attributeTTFB = (metric: TTFBMetric): void => {
3030

3131
const dnsStart = Math.max(
3232
navigationEntry.domainLookupStart - activationStart,
33-
0
33+
0,
3434
);
3535
const connectStart = Math.max(
3636
navigationEntry.connectStart - activationStart,
37-
0
37+
0,
3838
);
3939
const requestStart = Math.max(
4040
navigationEntry.requestStart - activationStart,
41-
0
41+
0,
4242
);
4343

4444
(metric as TTFBMetricWithAttribution).attribution = {
@@ -76,13 +76,13 @@ const attributeTTFB = (metric: TTFBMetric): void => {
7676
*/
7777
export const onTTFB = (
7878
onReport: TTFBReportCallbackWithAttribution,
79-
opts?: ReportOpts
79+
opts?: ReportOpts,
8080
) => {
8181
unattributedOnTTFB(
8282
((metric: TTFBMetricWithAttribution) => {
8383
attributeTTFB(metric);
8484
onReport(metric);
8585
}) as TTFBReportCallback,
86-
opts
86+
opts,
8787
);
8888
};

src/lib/bfcache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ export const onBFCacheRestore = (cb: onBFCacheRestoreCallback) => {
3131
cb(event);
3232
}
3333
},
34-
true
34+
true,
3535
);
3636
};

src/lib/bindReporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {MetricType, MetricRatingThresholds} from '../types.js';
1818

1919
const getRating = (
2020
value: number,
21-
thresholds: MetricRatingThresholds
21+
thresholds: MetricRatingThresholds,
2222
): MetricType['rating'] => {
2323
if (value > thresholds[1]) {
2424
return 'poor';
@@ -33,7 +33,7 @@ export const bindReporter = <MetricName extends MetricType['name']>(
3333
callback: (metric: Extract<MetricType, {name: MetricName}>) => void,
3434
metric: Extract<MetricType, {name: MetricName}>,
3535
thresholds: MetricRatingThresholds,
36-
reportAllChanges?: boolean
36+
reportAllChanges?: boolean,
3737
) => {
3838
let prevValue: number;
3939
let delta: number;

src/lib/getNavigationEntry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const getNavigationEntryFromPerformanceTiming =
3232
navigationEntry[key] = Math.max(
3333
(timing[key as keyof PerformanceTiming] as number) -
3434
timing.navigationStart,
35-
0
35+
0,
3636
);
3737
}
3838
}

0 commit comments

Comments
 (0)