diff --git a/.vscode/settings.json b/.vscode/settings.json index 2950621966b9..c08a9a92297c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -36,7 +36,7 @@ ], "deno.enablePaths": ["packages/deno/test"], "editor.codeActionsOnSave": { - "source.organizeImports.biome": "explicit", + "source.organizeImports.biome": "explicit" }, "editor.defaultFormatter": "biomejs.biome" } diff --git a/biome.json b/biome.json index ccb69e4746db..985d16529c80 100644 --- a/biome.json +++ b/biome.json @@ -3,7 +3,8 @@ "vcs": { "enabled": true, "clientKind": "git", - "useIgnoreFile": true + "useIgnoreFile": true, + "defaultBranch": "develop" }, "organizeImports": { "enabled": true @@ -12,8 +13,13 @@ "enabled": true, "rules": { "recommended": false, + "complexity": { + "all": false, + "useRegexLiterals": "error" + }, "correctness": { "all": false, + "noUnusedImports": "error", "noUnusedVariables": "error", "noPrecisionLoss": "error" }, @@ -21,13 +27,8 @@ "all": false, "noControlCharactersInRegex": "error" }, - "nursery": { - "noUnusedImports": "error", - "useRegexLiterals": "error" - }, "performance": { "all": true, - "noAccumulatingSpread": "error", "noDelete": "off" } }, @@ -82,11 +83,16 @@ }, "parser": { "unsafeParameterDecoratorsEnabled": true - } + }, + "globals": ["Astro", "Deno"] }, "json": { "formatter": { "enabled": true + }, + "parser": { + "allowComments": true, + "allowTrailingCommas": true } } } diff --git a/dev-packages/browser-integration-tests/utils/helpers.ts b/dev-packages/browser-integration-tests/utils/helpers.ts index 0e54eea0fb31..3a6f0bea3c4a 100644 --- a/dev-packages/browser-integration-tests/utils/helpers.ts +++ b/dev-packages/browser-integration-tests/utils/helpers.ts @@ -90,13 +90,10 @@ export const countEnvelopes = async ( page.on('request', requestHandler); - setTimeout( - () => { - page.off('request', requestHandler); - resolve(reqCount); - }, - options?.timeout || 1000, - ); + setTimeout(() => { + page.off('request', requestHandler); + resolve(reqCount); + }, options?.timeout || 1000); }); if (options?.url) { diff --git a/dev-packages/e2e-tests/test-applications/angular-17/tsconfig.app.json b/dev-packages/e2e-tests/test-applications/angular-17/tsconfig.app.json index 374cc9d294aa..84f1f992d275 100644 --- a/dev-packages/e2e-tests/test-applications/angular-17/tsconfig.app.json +++ b/dev-packages/e2e-tests/test-applications/angular-17/tsconfig.app.json @@ -5,10 +5,6 @@ "outDir": "./out-tsc/app", "types": [] }, - "files": [ - "src/main.ts" - ], - "include": [ - "src/**/*.d.ts" - ] + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] } diff --git a/dev-packages/e2e-tests/test-applications/angular-17/tsconfig.json b/dev-packages/e2e-tests/test-applications/angular-17/tsconfig.json index e850ebdafb6e..4a7b9307522b 100644 --- a/dev-packages/e2e-tests/test-applications/angular-17/tsconfig.json +++ b/dev-packages/e2e-tests/test-applications/angular-17/tsconfig.json @@ -19,10 +19,7 @@ "target": "ES2022", "module": "ES2022", "useDefineForClassFields": false, - "lib": [ - "ES2022", - "dom" - ] + "lib": ["ES2022", "dom"] }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, diff --git a/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/components/Card.astro b/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/components/Card.astro index bd6d5971ebf3..e972406e866f 100644 --- a/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/components/Card.astro +++ b/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/components/Card.astro @@ -1,8 +1,8 @@ --- interface Props { - title: string; - body: string; - href: string; + title: string; + body: string; + href: string; } const { href, title, body } = Astro.props; diff --git a/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/layouts/Layout.astro b/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/layouts/Layout.astro index 7b552be19bca..7ea79bd5b0ef 100644 --- a/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/layouts/Layout.astro +++ b/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/layouts/Layout.astro @@ -1,6 +1,6 @@ --- interface Props { - title: string; + title: string; } const { title } = Astro.props; diff --git a/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/pages/index.astro b/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/pages/index.astro index fb6262872d0e..168a1b1769ce 100644 --- a/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/pages/index.astro +++ b/dev-packages/e2e-tests/test-applications/cloudflare-astro/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import Layout from '../layouts/Layout.astro'; import Card from '../components/Card.astro'; +import Layout from '../layouts/Layout.astro'; --- diff --git a/dev-packages/e2e-tests/test-applications/create-react-app/package.json b/dev-packages/e2e-tests/test-applications/create-react-app/package.json index a6f33f5372f4..756a3e5ce2eb 100644 --- a/dev-packages/e2e-tests/test-applications/create-react-app/package.json +++ b/dev-packages/e2e-tests/test-applications/create-react-app/package.json @@ -29,22 +29,11 @@ "test:assert": "pnpm -v" }, "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] + "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" - ] + "production": [">0.2%", "not dead", "not op_mini all"], + "development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"] }, "volta": { "extends": "../../package.json" diff --git a/dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts b/dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts index 241d82f715a0..570c983a0740 100644 --- a/dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts +++ b/dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts @@ -1,14 +1,7 @@ -// biome-ignore lint/nursery/noUnusedImports: we need to import the SDK to ensure tsc check the types import * as _SentryBrowser from '@sentry/browser'; -// biome-ignore lint/nursery/noUnusedImports: import * as _SentryCore from '@sentry/core'; -// biome-ignore lint/nursery/noUnusedImports: import * as _SentryNode from '@sentry/node'; -// biome-ignore lint/nursery/noUnusedImports: import * as _SentryReplay from '@sentry/replay'; -// biome-ignore lint/nursery/noUnusedImports: import * as _SentryTypes from '@sentry/types'; -// biome-ignore lint/nursery/noUnusedImports: import * as _SentryUtils from '@sentry/utils'; -// biome-ignore lint/nursery/noUnusedImports: import * as _SentryWasm from '@sentry/wasm'; diff --git a/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json b/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json index d1842bc24d91..d3e9cc3ef9b2 100644 --- a/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json +++ b/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json @@ -28,22 +28,11 @@ "test:assert": "pnpm test" }, "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] + "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" - ] + "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.26.1", diff --git a/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx index 7789a2773224..f339eb867d6c 100644 --- a/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx +++ b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx @@ -1,5 +1,4 @@ import * as Sentry from '@sentry/react'; -// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX import * as React from 'react'; import { Link } from 'react-router-dom'; diff --git a/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx index 62f0c2d17533..671455a92fff 100644 --- a/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx +++ b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx @@ -1,4 +1,3 @@ -// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX import * as React from 'react'; const User = () => { diff --git a/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/package.json b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/package.json index a0e7c162f0f0..00acdf12c95f 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/package.json +++ b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/package.json @@ -29,22 +29,11 @@ "test:assert": "pnpm test" }, "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] + "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" - ] + "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.26.1", diff --git a/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx index 7789a2773224..f339eb867d6c 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx +++ b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx @@ -1,5 +1,4 @@ import * as Sentry from '@sentry/react'; -// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX import * as React from 'react'; import { Link } from 'react-router-dom'; diff --git a/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx index 62f0c2d17533..671455a92fff 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx +++ b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx @@ -1,4 +1,3 @@ -// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX import * as React from 'react'; const User = () => { diff --git a/dev-packages/e2e-tests/test-applications/standard-frontend-react/package.json b/dev-packages/e2e-tests/test-applications/standard-frontend-react/package.json index 10ace7b83893..eb9e5e26eb88 100644 --- a/dev-packages/e2e-tests/test-applications/standard-frontend-react/package.json +++ b/dev-packages/e2e-tests/test-applications/standard-frontend-react/package.json @@ -29,22 +29,11 @@ "test:assert": "pnpm test" }, "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] + "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" - ] + "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.26.1", diff --git a/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx index 7789a2773224..f339eb867d6c 100644 --- a/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx +++ b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx @@ -1,5 +1,4 @@ import * as Sentry from '@sentry/react'; -// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX import * as React from 'react'; import { Link } from 'react-router-dom'; diff --git a/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx index 62f0c2d17533..671455a92fff 100644 --- a/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx +++ b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx @@ -1,4 +1,3 @@ -// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX import * as React from 'react'; const User = () => { diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/package.json b/dev-packages/e2e-tests/test-applications/sveltekit-2/package.json index deac95bf05c0..be56cf9da1c7 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/package.json +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/package.json @@ -24,7 +24,7 @@ "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-node": "^2.0.0", "@sveltejs/kit": "^2.5.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", "svelte": "^4.2.8", "svelte-check": "^3.6.0", "ts-node": "10.9.1", diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/+layout.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/+layout.svelte index 8eb402c9eda6..274114b6a88b 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/+layout.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/+layout.svelte @@ -1,14 +1,12 @@

Sveltekit E2E Test app

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte index b27edb70053d..620bf0d61d12 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte @@ -1,16 +1,19 @@

Check Build

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/client-error/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/client-error/+page.svelte index ba6b464e9324..4221372337fc 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/client-error/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/client-error/+page.svelte @@ -1,7 +1,7 @@

Client error

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-load-error/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-load-error/+page.svelte index 3a0942971d06..8f0c48361b3c 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-load-error/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-load-error/+page.svelte @@ -1,5 +1,5 @@

Server load error

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-route-error/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-route-error/+page.svelte index 3d682e7e3462..6e0fa27d8a64 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-route-error/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-route-error/+page.svelte @@ -1,5 +1,5 @@

Server Route error

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/universal-load-error/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/universal-load-error/+page.svelte index dc2d311a0ece..8cff8b841de0 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/universal-load-error/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/universal-load-error/+page.svelte @@ -1,5 +1,5 @@

Universal load error

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/universal-load-fetch/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/universal-load-fetch/+page.svelte index 563c51e8c850..578cf58b1eff 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/universal-load-fetch/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/universal-load-fetch/+page.svelte @@ -1,6 +1,6 @@

Fetching in universal load

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/users/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/users/+page.svelte index aa804a4518fa..2c47b1e6d62c 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/users/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/users/+page.svelte @@ -1,5 +1,5 @@

All Users: diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/+layout.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/+layout.svelte index 8b7db6f720bf..40e291e818da 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/+layout.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/+layout.svelte @@ -1,10 +1,10 @@ diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/client-error/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/client-error/+page.svelte index ba6b464e9324..4221372337fc 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/client-error/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/client-error/+page.svelte @@ -1,7 +1,7 @@

Client error

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/server-load-error/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/server-load-error/+page.svelte index 3a0942971d06..8f0c48361b3c 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/server-load-error/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/server-load-error/+page.svelte @@ -1,5 +1,5 @@

Server load error

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/server-route-error/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/server-route-error/+page.svelte index 3d682e7e3462..6e0fa27d8a64 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/server-route-error/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/server-route-error/+page.svelte @@ -1,5 +1,5 @@

Server Route error

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/universal-load-error/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/universal-load-error/+page.svelte index dc2d311a0ece..8cff8b841de0 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/universal-load-error/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/universal-load-error/+page.svelte @@ -1,5 +1,5 @@

Universal load error

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/universal-load-fetch/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/universal-load-fetch/+page.svelte index 563c51e8c850..578cf58b1eff 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/universal-load-fetch/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/universal-load-fetch/+page.svelte @@ -1,6 +1,6 @@

Fetching in universal load

diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/users/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/users/+page.svelte index aa804a4518fa..2c47b1e6d62c 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/users/+page.svelte +++ b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/users/+page.svelte @@ -1,5 +1,5 @@

All Users: diff --git a/dev-packages/e2e-tests/test-applications/vue-3/src/App.vue b/dev-packages/e2e-tests/test-applications/vue-3/src/App.vue index 08c38cecfda9..8db0b7ca7507 100644 --- a/dev-packages/e2e-tests/test-applications/vue-3/src/App.vue +++ b/dev-packages/e2e-tests/test-applications/vue-3/src/App.vue @@ -1,5 +1,5 @@