Scott Cooper 5 месяцев назад
Родитель
Сommit
5889259054

+ 4 - 1
biome.json

@@ -36,7 +36,6 @@
         "noExcessiveNestedTestSuites": "error"
       },
       "nursery": {
-        "noDuplicateJsonKeys": "error",
         "noRestrictedImports": {
           "level": "warn",
           "options": {
@@ -100,6 +99,10 @@
       ".devenv"
     ]
   },
+  "css": {
+    "formatter": { "enabled": false },
+    "linter": { "enabled": false }
+  },
   "formatter": {
     "enabled": true,
     "formatWithErrors": true,

+ 1 - 5
config/tsconfig.base.json

@@ -19,11 +19,7 @@
     "moduleResolution": "node",
 
     // We add esnext to lib to pull in types for all newer ECMAScript features
-    "lib": [
-      "esnext",
-      "dom",
-      "dom.iterable"
-    ],
+    "lib": ["esnext", "dom", "dom.iterable"],
 
     // Skip type checking of all declaration files
     "skipLibCheck": true,

+ 2 - 4
package.json

@@ -179,7 +179,7 @@
     "zxcvbn": "^4.4.2"
   },
   "devDependencies": {
-    "@biomejs/biome": "^1.8.3",
+    "@biomejs/biome": "^1.9.1",
     "@codecov/webpack-plugin": "^1.0.0",
     "@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
     "@sentry/jest-environment": "6.0.0",
@@ -266,9 +266,7 @@
       "last 3 iOS major versions",
       "Firefox ESR"
     ],
-    "test": [
-      "current node"
-    ]
+    "test": ["current node"]
   },
   "volta": {
     "extends": ".volta.json"

+ 14 - 52
src/flagpole/flagpole-schema.json

@@ -35,12 +35,7 @@
       "pattern": "^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)?$"
     }
   },
-  "required": [
-    "name",
-    "owner",
-    "segments",
-    "created_at"
-  ],
+  "required": ["name", "owner", "segments", "created_at"],
   "definitions": {
     "InCondition": {
       "title": "InCondition",
@@ -54,9 +49,7 @@
         "operator": {
           "title": "Operator",
           "default": "in",
-          "enum": [
-            "in"
-          ],
+          "enum": ["in"],
           "type": "string"
         },
         "value": {
@@ -83,10 +76,7 @@
           ]
         }
       },
-      "required": [
-        "property",
-        "value"
-      ]
+      "required": ["property", "value"]
     },
     "NotInCondition": {
       "title": "NotInCondition",
@@ -100,9 +90,7 @@
         "operator": {
           "title": "Operator",
           "default": "not_in",
-          "enum": [
-            "not_in"
-          ],
+          "enum": ["not_in"],
           "type": "string"
         },
         "value": {
@@ -129,10 +117,7 @@
           ]
         }
       },
-      "required": [
-        "property",
-        "value"
-      ]
+      "required": ["property", "value"]
     },
     "ContainsCondition": {
       "title": "ContainsCondition",
@@ -146,9 +131,7 @@
         "operator": {
           "title": "Operator",
           "default": "contains",
-          "enum": [
-            "contains"
-          ],
+          "enum": ["contains"],
           "type": "string"
         },
         "value": {
@@ -166,10 +149,7 @@
           ]
         }
       },
-      "required": [
-        "property",
-        "value"
-      ]
+      "required": ["property", "value"]
     },
     "NotContainsCondition": {
       "title": "NotContainsCondition",
@@ -183,9 +163,7 @@
         "operator": {
           "title": "Operator",
           "default": "not_contains",
-          "enum": [
-            "not_contains"
-          ],
+          "enum": ["not_contains"],
           "type": "string"
         },
         "value": {
@@ -203,10 +181,7 @@
           ]
         }
       },
-      "required": [
-        "property",
-        "value"
-      ]
+      "required": ["property", "value"]
     },
     "EqualsCondition": {
       "title": "EqualsCondition",
@@ -220,9 +195,7 @@
         "operator": {
           "title": "Operator",
           "default": "equals",
-          "enum": [
-            "equals"
-          ],
+          "enum": ["equals"],
           "type": "string"
         },
         "value": {
@@ -261,10 +234,7 @@
           ]
         }
       },
-      "required": [
-        "property",
-        "value"
-      ]
+      "required": ["property", "value"]
     },
     "NotEqualsCondition": {
       "title": "NotEqualsCondition",
@@ -278,9 +248,7 @@
         "operator": {
           "title": "Operator",
           "default": "not_equals",
-          "enum": [
-            "not_equals"
-          ],
+          "enum": ["not_equals"],
           "type": "string"
         },
         "value": {
@@ -319,10 +287,7 @@
           ]
         }
       },
-      "required": [
-        "property",
-        "value"
-      ]
+      "required": ["property", "value"]
     },
     "Segment": {
       "title": "Segment",
@@ -379,10 +344,7 @@
           "type": "integer"
         }
       },
-      "required": [
-        "name",
-        "conditions"
-      ]
+      "required": ["name", "conditions"]
     }
   }
 }

+ 2 - 1
static/app/bootstrap/initializeSdk.tsx

@@ -1,4 +1,5 @@
-// eslint-disable-next-line simple-import-sort/imports
+/* eslint-disable simple-import-sort/imports */
+// biome-ignore lint/nursery/noRestrictedImports: ignore warning
 import {browserHistory, createRoutes, match} from 'react-router';
 import * as Sentry from '@sentry/react';
 import {_browserPerformanceTimeOriginMode} from '@sentry/utils';

+ 0 - 1
static/app/components/replays/videoReplayer.spec.tsx

@@ -8,7 +8,6 @@ import {VideoReplayer} from './videoReplayer';
 // replays.
 //
 // advancing by 2000ms ~== 20000s in Timer, but this may depend on hardware, TBD
-// biome-ignore lint/correctness/useHookAtTopLevel: not a hook
 jest.useFakeTimers();
 jest.spyOn(window.HTMLMediaElement.prototype, 'pause').mockImplementation(() => {});
 

+ 1 - 0
static/app/routes.tsx

@@ -1,4 +1,5 @@
 import {Fragment, lazy} from 'react';
+// biome-ignore lint/nursery/noRestrictedImports: warning
 import {IndexRedirect, Redirect} from 'react-router';
 import memoize from 'lodash/memoize';
 

+ 0 - 1
static/app/utils/eventWaiter.spec.tsx

@@ -5,7 +5,6 @@ import {act, render} from 'sentry-test/reactTestingLibrary';
 
 import EventWaiter from 'sentry/utils/eventWaiter';
 
-// biome-ignore lint/correctness/useHookAtTopLevel: not a hook
 jest.useFakeTimers();
 
 describe('EventWaiter', function () {

+ 0 - 1
static/app/utils/replays/timer.spec.tsx

@@ -1,6 +1,5 @@
 import {Timer} from './timer';
 
-// biome-ignore lint/correctness/useHookAtTopLevel: not a hook
 jest.useFakeTimers();
 
 describe('Replay Timer', () => {

+ 0 - 1
static/app/utils/useTimeout.spec.tsx

@@ -2,7 +2,6 @@ import {renderHook} from 'sentry-test/reactTestingLibrary';
 
 import useTimeout from './useTimeout';
 
-// biome-ignore lint/correctness/useHookAtTopLevel: not a hook
 jest.useFakeTimers();
 
 describe('useTimeout', () => {

Некоторые файлы не были показаны из-за большого количества измененных файлов