Skip to content

Commit 109acf8

Browse files
committed
style: fix styling errors
1 parent 76cc1ec commit 109acf8

File tree

43 files changed

+905
-870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+905
-870
lines changed

biome.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@
2121
"indentWidth": 2,
2222
"lineWidth": 120,
2323
"ignore": [
24-
"*.md",
25-
".nxcache",
2624
"packages/browser-integration-tests/fixtures/loader.js",
27-
"packages/browser/examples/bundle.js"
25+
"packages/browser-integration-tests/suites/**/*.json",
26+
"packages/browser-integration-tests/loader-suites/**/*.js",
27+
"packages/browser-integration-tests/suites/stacktraces/**/*.js",
28+
"**/fixtures/*/*.json",
29+
"packages/browser/examples/bundle.js",
30+
"**/*.min.js"
2831
]
2932
},
3033
"javascript": {

packages/astro/src/integration/snippets.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const buildCommonInitOptions = (options: SentryOptions): string => `dsn: ${
4343
environment: ${options.environment ? JSON.stringify(options.environment) : 'import.meta.env.PUBLIC_VERCEL_ENV'},
4444
release: ${options.release ? JSON.stringify(options.release) : 'import.meta.env.PUBLIC_VERCEL_GIT_COMMIT_SHA'},
4545
tracesSampleRate: ${options.tracesSampleRate ?? 1.0},${
46-
options.sampleRate ? `\n sampleRate: ${options.sampleRate},` : ''
47-
}`;
46+
options.sampleRate ? `\n sampleRate: ${options.sampleRate},` : ''
47+
}`;
4848

4949
/**
5050
* We don't include the `BrowserTracing` integration if the tracesSampleRate is set to 0.

packages/astro/src/server/meta.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ export function getTracingMetaTags(span: Span | undefined, hub: Hub): { sentryTr
3333
const dynamicSamplingContext = transaction
3434
? transaction.getDynamicSamplingContext()
3535
: dsc
36-
? dsc
37-
: client
38-
? getDynamicSamplingContextFromClient(traceId, client, scope)
39-
: undefined;
36+
? dsc
37+
: client
38+
? getDynamicSamplingContextFromClient(traceId, client, scope)
39+
: undefined;
4040

4141
const baggage = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);
4242

packages/browser-integration-tests/utils/helpers.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,13 @@ export const countEnvelopes = async (
6868

6969
page.on('request', requestHandler);
7070

71-
setTimeout(() => {
72-
page.off('request', requestHandler);
73-
resolve(reqCount);
74-
}, options?.timeout || 1000);
71+
setTimeout(
72+
() => {
73+
page.off('request', requestHandler);
74+
resolve(reqCount);
75+
},
76+
options?.timeout || 1000,
77+
);
7578
});
7679

7780
if (options?.url) {

packages/browser/examples/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ function makeHappyTransport(options) {
3131
method: 'POST',
3232
referrerPolicy: 'origin',
3333
headers: options.headers,
34-
...options.fetchOptions
34+
...options.fetchOptions,
3535
};
3636

3737
// you define how `sendMyCustomRequest` works
38-
const sendMyCustomRequest = (r) => fetch(options.url, r);
38+
const sendMyCustomRequest = r => fetch(options.url, r);
3939
return sendMyCustomRequest(myCustomRequest).then(response => ({
4040
statusCode: response.status,
4141
headers: {

packages/browser/src/integrations/trycatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function _wrapEventTarget(target: string): void {
195195
return;
196196
}
197197

198-
fill(proto, 'addEventListener', function (original: () => void): (
198+
fill(proto, 'addEventListener', function (original: VoidFunction,): (
199199
eventName: string,
200200
fn: EventListenerObject,
201201
options?: boolean | AddEventListenerOptions,

packages/browser/src/loader.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// prettier-ignore
2-
// Prettier disabled due to trailing comma not working in IE10/11
1+
// biome-ignore format: Disabled due to trailing comma not working in IE10/11
32
(function(
43
_window,
54
_document,

packages/browser/src/profiling/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ export function createProfilePayload(
143143
const transactionStartMs = start_timestamp
144144
? start_timestamp
145145
: typeof event.start_timestamp === 'number'
146-
? event.start_timestamp * 1000
147-
: Date.now();
146+
? event.start_timestamp * 1000
147+
: Date.now();
148148
const transactionEndMs = typeof event.timestamp === 'number' ? event.timestamp * 1000 : Date.now();
149149

150150
const profile: Profile = {

packages/browser/test/integration/.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/browser/test/integration/polyfills/fetch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
typeof exports === 'object' && typeof module !== 'undefined'
1111
? factory(exports)
1212
: typeof define === 'function' && define.amd
13-
? define(['exports'], factory)
14-
: factory((global.WHATWGFetch = {}));
13+
? define(['exports'], factory)
14+
: factory((global.WHATWGFetch = {}));
1515
})(this, function (exports) {
1616
'use strict';
1717

packages/browser/test/integration/polyfills/promise.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
typeof exports === 'object' && typeof module !== 'undefined'
1111
? (module.exports = factory())
1212
: typeof define === 'function' && define.amd
13-
? define(factory)
14-
: (global.ES6Promise = factory());
13+
? define(factory)
14+
: (global.ES6Promise = factory());
1515
})(this, function () {
1616
'use strict';
1717

@@ -279,7 +279,7 @@
279279

280280
reject(promise, reason);
281281
},
282-
'Settle: ' + (promise._label || ' unknown promise')
282+
'Settle: ' + (promise._label || ' unknown promise'),
283283
);
284284

285285
if (!sealed && error) {
@@ -303,7 +303,7 @@
303303
},
304304
function (reason) {
305305
return reject(promise, reason);
306-
}
306+
},
307307
);
308308
}
309309
}
@@ -458,7 +458,7 @@
458458
},
459459
function rejectPromise(reason) {
460460
reject(promise, reason);
461-
}
461+
},
462462
);
463463
} catch (e) {
464464
reject(promise, e);
@@ -549,7 +549,7 @@
549549
new c(function (resolve$$1) {
550550
return resolve$$1(entry);
551551
}),
552-
i
552+
i,
553553
);
554554
}
555555
} else {
@@ -586,7 +586,7 @@
586586
},
587587
function (reason) {
588588
return enumerator._settledAt(REJECTED, i, reason);
589-
}
589+
},
590590
);
591591
};
592592

@@ -775,7 +775,7 @@
775775

776776
function needsNew() {
777777
throw new TypeError(
778-
"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."
778+
"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.",
779779
);
780780
}
781781

@@ -1138,7 +1138,7 @@
11381138
return constructor.resolve(callback()).then(function () {
11391139
throw reason;
11401140
});
1141-
}
1141+
},
11421142
);
11431143
}
11441144

packages/browser/test/integration/run.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,25 @@ function build() {
7373

7474
writeFile(
7575
'artifacts/dedupe.js',
76-
readFile('../../../integrations/build/bundles/dedupe.js').replace('//# sourceMappingURL=dedupe.js.map', '')
76+
readFile('../../../integrations/build/bundles/dedupe.js').replace('//# sourceMappingURL=dedupe.js.map', ''),
7777
);
7878
concatFiles('artifacts/setup.js', ['artifacts/dedupe.js', 'common/utils.js', 'common/triggers.js', 'common/init.js']);
7979
rmdir('artifacts/dedupe.js');
8080

8181
writeFile(
8282
'artifacts/sdk.js',
83-
readFile('../../build/bundles/bundle.js').replace('//# sourceMappingURL=bundle.js.map', '')
83+
readFile('../../build/bundles/bundle.js').replace('//# sourceMappingURL=bundle.js.map', ''),
8484
);
8585
writeFile(
8686
'artifacts/loader.js',
87-
readFile('../../src/loader.js').replace('../../build/bundles/bundle.js', '/base/artifacts/sdk.js')
87+
readFile('../../src/loader.js').replace('../../build/bundles/bundle.js', '/base/artifacts/sdk.js'),
8888
);
8989

9090
writeFile(
9191
'artifacts/tests.js',
92-
[readFile('polyfills/promise.js'), readFile('suites/helpers.js'), replacePlaceholders('suites/shell.js')].join('\n')
92+
[readFile('polyfills/promise.js'), readFile('suites/helpers.js'), replacePlaceholders('suites/shell.js')].join(
93+
'\n',
94+
),
9395
);
9496
}
9597

packages/browser/test/integration/suites/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe('API', function () {
8282
summary.events[0].exception.values[0].stacktrace.frames[
8383
summary.events[0].exception.values[0].stacktrace.frames.length - 1
8484
].function,
85-
'bar'
85+
'bar',
8686
);
8787
assert.isAtLeast(summary.events[0].exception.values[0].stacktrace.frames.length, 2);
8888
assert.isAtMost(summary.events[0].exception.values[0].stacktrace.frames.length, 4);

packages/browser/test/integration/suites/breadcrumbs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('breadcrumbs', function () {
106106
},
107107
function () {
108108
Sentry.captureMessage('test');
109-
}
109+
},
110110
)
111111
.then(function () {
112112
window.finalizeManualTest();
@@ -146,7 +146,7 @@ describe('breadcrumbs', function () {
146146
},
147147
function () {
148148
Sentry.captureMessage('test');
149-
}
149+
},
150150
)
151151
.then(function () {
152152
window.finalizeManualTest();
@@ -187,7 +187,7 @@ describe('breadcrumbs', function () {
187187
},
188188
function () {
189189
Sentry.captureMessage('test');
190-
}
190+
},
191191
)
192192
.then(function () {
193193
window.finalizeManualTest();
@@ -734,7 +734,7 @@ describe('breadcrumbs', function () {
734734
assert.ok(/\[object Object\]$/.test(summary.breadcrumbs[3].data.from), "'from' url is incorrect");
735735
assert.ok(/\/bar\?a=1#fragment/.test(summary.breadcrumbs[3].data.to), "'to' url is incorrect");
736736
});
737-
}
737+
},
738738
);
739739

740740
it(optional('should preserve native code detection compatibility', IS_LOADER), function () {

packages/browser/test/integration/suites/builtins.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('wrapped built-ins', function () {
1010
window.context = this;
1111
foo();
1212
},
13-
false
13+
false,
1414
);
1515
var click = new MouseEvent('click');
1616
div.dispatchEvent(click);
@@ -252,7 +252,7 @@ describe('wrapped built-ins', function () {
252252
function namedFunction() {
253253
foo();
254254
},
255-
false
255+
false,
256256
);
257257
var click = new MouseEvent('click');
258258
div.dispatchEvent(click);
@@ -297,7 +297,7 @@ describe('wrapped built-ins', function () {
297297
function () {
298298
foo();
299299
},
300-
false
300+
false,
301301
);
302302
var click = new MouseEvent('click');
303303
div.dispatchEvent(click);
@@ -321,6 +321,6 @@ describe('wrapped built-ins', function () {
321321
});
322322
}
323323
});
324-
}
324+
},
325325
);
326326
});

packages/browser/test/integration/suites/onerror.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ describe('window.onerror', function () {
3232
// but not all - falls back to frame url
3333
assert.match(
3434
summary.events[0].exception.values[0].stacktrace.frames[0].filename,
35-
/(\/subjects\/throw-string.js|\/base\/variants\/)/
35+
/(\/subjects\/throw-string.js|\/base\/variants\/)/,
3636
);
3737
assert.match(
3838
summary.events[0].exception.values[0].stacktrace.frames[0]['function'],
39-
/throwStringError|\?|global code/i
39+
/throwStringError|\?|global code/i,
4040
);
4141
});
4242
});
@@ -61,7 +61,7 @@ describe('window.onerror', function () {
6161
} else {
6262
assert.equal(
6363
summary.events[0].exception.values[0].value,
64-
'Object captured as exception with keys: error, somekey'
64+
'Object captured as exception with keys: error, somekey',
6565
);
6666
}
6767
assert.equal(summary.events[0].exception.values[0].stacktrace.frames.length, 1); // always 1 because thrown objects can't provide > 1 frame
@@ -70,11 +70,11 @@ describe('window.onerror', function () {
7070
// but not all - falls back to frame url
7171
assert.match(
7272
summary.events[0].exception.values[0].stacktrace.frames[0].filename,
73-
/(\/subjects\/throw-object.js|\/base\/variants\/)/
73+
/(\/subjects\/throw-object.js|\/base\/variants\/)/,
7474
);
7575
assert.match(
7676
summary.events[0].exception.values[0].stacktrace.frames[0]['function'],
77-
/throwStringError|\?|global code/i
77+
/throwStringError|\?|global code/i,
7878
);
7979
});
8080
});
@@ -104,7 +104,7 @@ describe('window.onerror', function () {
104104
assert.match(summary.events[0].exception.values[0].stacktrace.frames[0].filename, /\/subjects\/throw-error\.js/);
105105
assert.match(
106106
summary.events[0].exception.values[0].stacktrace.frames[0]['function'],
107-
/\?|global code|throwRealError/i
107+
/\?|global code|throwRealError/i,
108108
);
109109
});
110110
});
@@ -119,7 +119,7 @@ describe('window.onerror', function () {
119119
assert.equal(summary.events[0].exception.values[0].type, 'Error');
120120
assert.equal(
121121
summary.events[0].exception.values[0].value,
122-
'Object captured as exception with keys: otherKey, type'
122+
'Object captured as exception with keys: otherKey, type',
123123
);
124124
assert.deepEqual(summary.events[0].extra.__serialized__, {
125125
type: 'error',

0 commit comments

Comments
 (0)