Skip to content

Commit 44f5bda

Browse files
committed
feat: enable biome recommended linter rules
1 parent 56845fb commit 44f5bda

File tree

263 files changed

+1431
-1614
lines changed

Some content is hidden

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

263 files changed

+1431
-1614
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",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"codecov": "codecov",
2121
"fix": "run-s fix:lerna fix:biome",
2222
"fix:lerna": "lerna run fix",
23-
"fix:biome": "biome check --apply-unsafe .",
23+
"fix:biome": "biome check --apply .",
2424
"changelog": "ts-node ./scripts/get-commit-list.ts",
2525
"link:yarn": "lerna exec yarn link",
2626
"lint": "run-s lint:lerna lint:biome",

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;
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

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
});

packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/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: integrations => [new CustomIntegration()].concat(integrations),
1212
});

0 commit comments

Comments
 (0)