Skip to content

Commit 3e5fb88

Browse files
committed
feat: enable biome recommended linter rules
1 parent 56845fb commit 3e5fb88

File tree

406 files changed

+2422
-2623
lines changed

Some content is hidden

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

406 files changed

+2422
-2623
lines changed

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = [
2020
import: '{ init, Replay, BrowserTracing }',
2121
gzip: true,
2222
limit: '75 KB',
23-
modifyWebpackConfig: function (config) {
23+
modifyWebpackConfig: config => {
2424
const webpack = require('webpack');
2525
config.plugins.push(
2626
new webpack.DefinePlugin({

biome.json

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,26 @@
1111
"linter": {
1212
"enabled": true,
1313
"rules": {
14-
"recommended": false,
15-
"correctness": {
16-
"all": false,
17-
"noUnusedVariables": "error",
18-
"noPrecisionLoss": "error"
14+
"recommended": true,
15+
"complexity": {
16+
"noForEach": "off",
17+
"useOptionalChain": "off"
18+
},
19+
"security": {
20+
"all": true
21+
},
22+
"style": {
23+
"noArguments": "off",
24+
"noNonNullAssertion": "off",
25+
"noUselessElse": "off",
26+
"useTemplate": "off"
1927
},
2028
"suspicious": {
21-
"all": false,
22-
"noControlCharactersInRegex": "error"
29+
"noDebugger": "off",
30+
"noExplicitAny": "off"
2331
}
2432
},
25-
"ignore": [".vscode/*", "**/*.json"]
33+
"ignore": [".vscode/*", "**/*.json", "**/*.min.js", "packages/browser-integration-tests/fixtures/loader.js"]
2634
},
2735
"files": {
2836
"ignoreUnknown": true
@@ -44,6 +52,7 @@
4452
]
4553
},
4654
"javascript": {
55+
"globals": ["expect", "describe", "test", "it", "beforeEach", "afterEach", "beforeAll", "afterAll"],
4756
"formatter": {
4857
"enabled": true,
4958
"quoteStyle": "single",

packages/angular-ivy/scripts/prepack.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ const pkgJson: PackageJson = JSON.parse(fs.readFileSync(pkjJsonPath).toString())
1515
// This is necessary for Angular 17+ compatibility when SSR is configured which switches dev mode to using Vite.
1616
// Deleting "main" and adding "type": "module" will direct Vite to
1717
// use the fesm2015 bundle instead of the UMD bundle.
18-
delete pkgJson.main;
18+
pkgJson.main = undefined;
1919
pkgJson.type = 'module';
2020

2121
// no need to keep around other properties that are only relevant for our reop:
22-
delete pkgJson.nx;
23-
delete pkgJson.volta;
22+
pkgJson.nx = undefined;
23+
pkgJson.volta = undefined;
2424

2525
fs.writeFileSync(pkjJsonPath, JSON.stringify(pkgJson, null, 2));
2626

packages/angular/src/tracing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ let stashedStartTransactionOnLocationChange: boolean;
2727
*/
2828
export function routingInstrumentation(
2929
customStartTransaction: (context: TransactionContext) => Transaction | undefined,
30-
startTransactionOnPageLoad: boolean = true,
31-
startTransactionOnLocationChange: boolean = true,
30+
startTransactionOnPageLoad = true,
31+
startTransactionOnLocationChange = true,
3232
): void {
3333
instrumentationInitialized = true;
3434
stashedStartTransaction = customStartTransaction;

packages/astro/test/client/sdk.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('Sentry client SDK', () => {
9696
expect(integrationsToInit).not.toContainEqual(expect.objectContaining({ name: 'BrowserTracing' }));
9797
expect(browserTracing).toBeUndefined();
9898

99-
delete globalThis.__SENTRY_TRACING__;
99+
globalThis.__SENTRY_TRACING__ = undefined;
100100
});
101101

102102
it('Overrides the automatically default BrowserTracing instance with a a user-provided instance', () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
new Promise(function (resolve, reject) {
1+
new Promise((resolve, reject) => {
22
reject('this is unhandled');
33
});

packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Sentry.onLoad(function () {
1+
Sentry.onLoad(() => {
22
// You _have_ to call Sentry.init() before calling Sentry.captureException() in Sentry.onLoad()!
33
Sentry.init();
44
Sentry.captureException('Test exception');

packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
window._testBaseTimestamp = performance.timeOrigin / 1000;
22

3-
Sentry.onLoad(function () {
3+
Sentry.onLoad(() => {
44
Sentry.init({
55
integrations: [
66
// Without this syntax, this will be re-written by the test framework
7-
new window['Sentry'].BrowserTracing({
7+
new window.Sentry.BrowserTracing({
88
tracePropagationTargets: ['http://localhost:1234'],
99
}),
1010
],

packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
window.__sentryOnLoad = 0;
22

33
setTimeout(() => {
4-
Sentry.onLoad(function () {
4+
Sentry.onLoad(() => {
55
window.__hadSentry = window.sentryIsLoaded();
66

77
Sentry.init({

packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class CustomIntegration {
66
setupOnce() {}
77
}
88

9-
Sentry.onLoad(function () {
9+
Sentry.onLoad(() => {
1010
Sentry.init({
1111
integrations: [new CustomIntegration()],
1212
});

0 commit comments

Comments
 (0)