From a6ce83172ee05ff59cef078ae90426cc368f8046 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Wed, 21 Jun 2023 14:08:25 +0100 Subject: [PATCH] Fix linter. --- .../create-hash-router/package.json | 30 ++++++++----------- .../create-hash-router/src/index.tsx | 9 +++--- .../create-hash-router/src/pages/Index.tsx | 4 +-- .../create-hash-router/src/pages/User.tsx | 2 +- .../create-hash-router/tests/test.ts | 5 ++-- packages/react/test/integration/run.ts | 4 +++ 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/react/test/integration/create-hash-router/package.json b/packages/react/test/integration/create-hash-router/package.json index e4e434eaaf41..fe3f068b1c59 100644 --- a/packages/react/test/integration/create-hash-router/package.json +++ b/packages/react/test/integration/create-hash-router/package.json @@ -25,24 +25,6 @@ "test": "playwright test", "posttest": "rimraf build node_modules" }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, "devDependencies": { "@playwright/test": "1.31.1", "serve": "14.0.1" @@ -62,5 +44,17 @@ "volta": { "node": "16.19.0", "yarn": "1.22.19" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] } } diff --git a/packages/react/test/integration/create-hash-router/src/index.tsx b/packages/react/test/integration/create-hash-router/src/index.tsx index decec736d8b5..dc0a66197adb 100644 --- a/packages/react/test/integration/create-hash-router/src/index.tsx +++ b/packages/react/test/integration/create-hash-router/src/index.tsx @@ -1,14 +1,15 @@ +import * as Sentry from '@sentry/react'; import React from 'react'; import ReactDOM from 'react-dom/client'; -import * as Sentry from '@sentry/react'; import { - useLocation, - useNavigationType, + createHashRouter, createRoutesFromChildren, matchRoutes, RouterProvider, - createHashRouter, + useLocation, + useNavigationType, } from 'react-router-dom'; + import Index from './pages/Index'; import User from './pages/User'; diff --git a/packages/react/test/integration/create-hash-router/src/pages/Index.tsx b/packages/react/test/integration/create-hash-router/src/pages/Index.tsx index 0911e8f62049..6df161c8629d 100644 --- a/packages/react/test/integration/create-hash-router/src/pages/Index.tsx +++ b/packages/react/test/integration/create-hash-router/src/pages/Index.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; import * as Sentry from '@sentry/react'; +import * as React from 'react'; import { Link } from 'react-router-dom'; -const Index = () => { +const Index = (): JSX.Element => { return ( <> { +const User = (): JSX.Element => { return

I am a blank page :)

; }; diff --git a/packages/react/test/integration/create-hash-router/tests/test.ts b/packages/react/test/integration/create-hash-router/tests/test.ts index f4ddb599ca49..e11d8a182299 100644 --- a/packages/react/test/integration/create-hash-router/tests/test.ts +++ b/packages/react/test/integration/create-hash-router/tests/test.ts @@ -1,6 +1,7 @@ -import { Transaction } from '@sentry/types'; +import { expect, test } from '@playwright/test'; +import type { Transaction } from '@sentry/types'; + import { getMultipleSentryEnvelopeRequests } from '../../utils'; -import { test, expect } from '@playwright/test'; test('Sends an error to Sentry', async ({ page }) => { await page.goto('/'); diff --git a/packages/react/test/integration/run.ts b/packages/react/test/integration/run.ts index 88f4c8b5bd70..ce210a800f8a 100644 --- a/packages/react/test/integration/run.ts +++ b/packages/react/test/integration/run.ts @@ -1,7 +1,11 @@ +/* eslint-disable no-console */ import { exec } from 'child_process'; import * as fs from 'fs'; async function run(): Promise { + // The ESLint plugin `react-scripts` uses is not compatible with our setup. + process.env.DISABLE_ESLINT_PLUGIN = 'true'; + fs.readdirSync(__dirname, { withFileTypes: true }) .filter(testApp => testApp.isDirectory()) .forEach(testApp => {