Skip to content

Commit 48f2fc5

Browse files
committed
feat: enable biome recommended linter rules
1 parent 56845fb commit 48f2fc5

File tree

286 files changed

+1518
-1708
lines changed

Some content is hidden

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

286 files changed

+1518
-1708
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: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,41 @@
1111
"linter": {
1212
"enabled": true,
1313
"rules": {
14-
"recommended": false,
14+
"recommended": true,
15+
"complexity": {
16+
"noForEach": "off",
17+
"noUselessConstructor": "off",
18+
"noStaticOnlyClass": "off",
19+
"useOptionalChain": "off",
20+
"useLiteralKeys": "off"
21+
},
1522
"correctness": {
16-
"all": false,
17-
"noUnusedVariables": "error",
18-
"noPrecisionLoss": "error"
23+
"noInnerDeclarations": "off"
24+
},
25+
"performance": {
26+
"noDelete": "off"
27+
},
28+
"security": {
29+
"all": true
30+
},
31+
"style": {
32+
"noArguments": "off",
33+
"noNonNullAssertion": "off",
34+
"noUselessElse": "off",
35+
"useTemplate": "off",
36+
"noVar": "off",
37+
"useSingleVarDeclarator": "off"
1938
},
2039
"suspicious": {
21-
"all": false,
22-
"noControlCharactersInRegex": "error"
40+
"noDebugger": "off",
41+
"noDoubleEquals": "off",
42+
"noExplicitAny": "off",
43+
"noRedeclare": "off",
44+
"noAssignInExpressions": "off",
45+
"noConfusingVoidType": "off"
2346
}
2447
},
25-
"ignore": [".vscode/*", "**/*.json"]
48+
"ignore": [".vscode/*", "**/*.json", "**/*.min.js", "packages/browser-integration-tests/fixtures/loader.js"]
2649
},
2750
"files": {
2851
"ignoreUnknown": true
@@ -44,6 +67,7 @@
4467
]
4568
},
4669
"javascript": {
70+
"globals": ["expect", "describe", "test", "it", "beforeEach", "afterEach", "beforeAll", "afterAll"],
4771
"formatter": {
4872
"enabled": true,
4973
"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: 3 additions & 3 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;
@@ -300,7 +300,7 @@ export function getParameterizedRouteFromSnapshot(route?: ActivatedRouteSnapshot
300300
let currentRoute = route && route.firstChild;
301301
while (currentRoute) {
302302
const path = currentRoute && currentRoute.routeConfig && currentRoute.routeConfig.path;
303-
if (path === null || path === undefined) {
303+
if (path == null) {
304304
break;
305305
}
306306

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)