Browse Source

feat(deps): upgrade eslint-config, biome part2 (#73466)

Scott Cooper 8 months ago
parent
commit
0298eef001

+ 2 - 2
.pre-commit-config.yaml

@@ -135,7 +135,7 @@ repos:
     hooks:
       - id: biome-check
         name: biome (javascript, typescript, json)
-        additional_dependencies: ['@biomejs/biome@1.8.0']
+        additional_dependencies: ['@biomejs/biome@1.8.3']
   - repo: https://github.com/pre-commit/mirrors-prettier
     rev: 'v3.1.0' # Use the sha or tag you want to point at
     hooks:
@@ -144,7 +144,7 @@ repos:
         # TODO: Remove tsx and jsx when Biome supports styled CSS formatting.
         types_or: [yaml, markdown, tsx, jsx, css]
         # Override the default version of prettier since there isn't a tag with 3.2.5
-        additional_dependencies: ['prettier@3.2.5']
+        additional_dependencies: ['prettier@3.3.2']
         # https://pre-commit.com/#regular-expressions
         exclude: |
           (?x)^($^

+ 3 - 3
package.json

@@ -143,7 +143,7 @@
     "pegjs-loader": "^0.5.6",
     "platformicons": "^5.10.9",
     "po-catalog-loader": "2.0.0",
-    "prettier": "3.2.5",
+    "prettier": "3.3.2",
     "prismjs": "^1.29.0",
     "process": "^0.11.10",
     "qrcode.react": "^3.1.0",
@@ -177,7 +177,7 @@
     "zxcvbn": "^4.4.2"
   },
   "devDependencies": {
-    "@biomejs/biome": "^1.8.0",
+    "@biomejs/biome": "^1.8.3",
     "@codecov/webpack-plugin": "^0.0.1-beta.8",
     "@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
     "@sentry/jest-environment": "6.0.0",
@@ -192,7 +192,7 @@
     "babel-jest": "29.7.0",
     "benchmark": "^2.1.4",
     "eslint": "8.57.0",
-    "eslint-config-sentry-app": "2.7.0",
+    "eslint-config-sentry-app": "2.8.0",
     "html-webpack-plugin": "^5.5.0",
     "jest": "29.7.0",
     "jest-canvas-mock": "^2.5.2",

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

@@ -8,6 +8,7 @@ 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(() => {});
 

+ 6 - 10
static/app/components/slider/index.tsx

@@ -172,16 +172,12 @@ function BaseSlider(
 
   const nThumbs = state.values.length;
   const refs = useRef<Array<HTMLInputElement>>([]);
-  useImperativeHandle(
-    forwardedRef,
-    () => {
-      if (nThumbs > 1) {
-        return refs.current;
-      }
-      return refs.current[0];
-    },
-    [nThumbs]
-  );
+  useImperativeHandle(forwardedRef, () => {
+    if (nThumbs > 1) {
+      return refs.current;
+    }
+    return refs.current[0];
+  }, [nThumbs]);
 
   const getFormattedValue = useCallback(
     (val: number) => {

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

@@ -5,6 +5,7 @@ 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 () {

+ 1 - 0
static/app/utils/profiling/renderers/flamegraphRendererWebGL.tsx

@@ -259,6 +259,7 @@ export class FlamegraphRendererWebGL extends FlamegraphRenderer {
     });
 
     // Use shader program
+    // biome-ignore lint/correctness/useHookAtTopLevel: not a hook
     this.ctx.useProgram(this.program);
 
     // Check if we should draw border - order matters here

+ 2 - 0
static/app/utils/profiling/renderers/uiFramesRendererWebGL.tsx

@@ -225,6 +225,7 @@ class UIFramesRendererWebGL extends UIFramesRenderer {
     });
 
     // Use shader program
+    // biome-ignore lint/correctness/useHookAtTopLevel: not a hook
     this.ctx.useProgram(this.program);
   }
 
@@ -251,6 +252,7 @@ class UIFramesRendererWebGL extends UIFramesRenderer {
       return;
     }
 
+    // biome-ignore lint/correctness/useHookAtTopLevel: not a hook
     this.ctx.useProgram(this.program);
 
     const projectionMatrix = makeProjectionMatrix(

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

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

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

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

+ 1 - 0
static/app/views/onboarding/createSampleEventButton.spec.tsx

@@ -8,6 +8,7 @@ import {trackAnalytics} from 'sentry/utils/analytics';
 import {browserHistory} from 'sentry/utils/browserHistory';
 import CreateSampleEventButton from 'sentry/views/onboarding/createSampleEventButton';
 
+// biome-ignore lint/correctness/useHookAtTopLevel: not a hook
 jest.useFakeTimers();
 jest.mock('sentry/utils/analytics');
 

Some files were not shown because too many files changed in this diff