diff --git a/apps/extension/src/entrypoints/options/App.svelte b/apps/extension/src/entrypoints/options/App.svelte
index 8e30e85a..8b9cb0ca 100644
--- a/apps/extension/src/entrypoints/options/App.svelte
+++ b/apps/extension/src/entrypoints/options/App.svelte
@@ -2,18 +2,19 @@
import { AudioFormatEnum, DownloadQualityEnum, VideoFormatEnum } from '@yd/client';
import {
Alert,
- toast,
- Select,
- Tabs,
- DownloadIcon,
CodeBracketIcon,
- LoaderIcon,
+ DownloadIcon,
Icon,
+ LoaderIcon,
+ Select,
+ Tabs,
+ toast,
Toggle,
toSelectOptions
} from '@yd/ui';
- import { settings } from '~/lib/stores/settings';
+
import PageLayout from '~/lib/components/PageLayout.svelte';
+ import { settings } from '~/lib/stores/settings';
let tabs = [
{
diff --git a/apps/extension/src/entrypoints/options/main.ts b/apps/extension/src/entrypoints/options/main.ts
index 11c31f93..235b8ea4 100644
--- a/apps/extension/src/entrypoints/options/main.ts
+++ b/apps/extension/src/entrypoints/options/main.ts
@@ -1,4 +1,5 @@
import '~/assets/tailwind.css';
+
import App from './App.svelte';
const app = new App({
diff --git a/apps/extension/src/entrypoints/popup/main.ts b/apps/extension/src/entrypoints/popup/main.ts
index 11c31f93..235b8ea4 100644
--- a/apps/extension/src/entrypoints/popup/main.ts
+++ b/apps/extension/src/entrypoints/popup/main.ts
@@ -1,4 +1,5 @@
import '~/assets/tailwind.css';
+
import App from './App.svelte';
const app = new App({
diff --git a/apps/extension/src/lib/components/DownloadActions.svelte b/apps/extension/src/lib/components/DownloadActions.svelte
index 35faa1eb..5343e298 100644
--- a/apps/extension/src/lib/components/DownloadActions.svelte
+++ b/apps/extension/src/lib/components/DownloadActions.svelte
@@ -1,6 +1,7 @@
diff --git a/apps/web/src/lib/components/StateIcon.svelte b/apps/web/src/lib/components/StateIcon.svelte
index 072afc75..d49f8985 100644
--- a/apps/web/src/lib/components/StateIcon.svelte
+++ b/apps/web/src/lib/components/StateIcon.svelte
@@ -1,12 +1,7 @@
diff --git a/apps/web/src/routes/+page.svelte b/apps/web/src/routes/+page.svelte
index 92cc3902..ea4e244e 100644
--- a/apps/web/src/routes/+page.svelte
+++ b/apps/web/src/routes/+page.svelte
@@ -1,8 +1,9 @@
diff --git a/apps/web/src/routes/settings/+page.svelte b/apps/web/src/routes/settings/+page.svelte
index 90890db7..af6ef976 100644
--- a/apps/web/src/routes/settings/+page.svelte
+++ b/apps/web/src/routes/settings/+page.svelte
@@ -1,18 +1,19 @@
diff --git a/packages/client/openapi-ts.config.ts b/packages/client/openapi-ts.config.ts
index b9ad782b..fac82ae5 100644
--- a/packages/client/openapi-ts.config.ts
+++ b/packages/client/openapi-ts.config.ts
@@ -1,4 +1,5 @@
import { defineConfig } from '@hey-api/openapi-ts';
+
import input from '@yd/api';
export default defineConfig({
diff --git a/packages/client/src/DownloadsStatusService.ts b/packages/client/src/DownloadsStatusService.ts
index c0993c36..47a69fbc 100644
--- a/packages/client/src/DownloadsStatusService.ts
+++ b/packages/client/src/DownloadsStatusService.ts
@@ -1,6 +1,7 @@
+import type { Download } from './generated';
import type { ApiRequestOptions } from './generated/core/ApiRequestOptions';
+import { OpenAPI } from './generated';
import { resolve } from './generated/core/request';
-import { type Download, OpenAPI } from './generated';
type EventSourceHandler = (event: T) => void;
diff --git a/packages/client/src/generated/core/request.ts b/packages/client/src/generated/core/request.ts
index 1fa0d0cc..3c52c794 100644
--- a/packages/client/src/generated/core/request.ts
+++ b/packages/client/src/generated/core/request.ts
@@ -1,9 +1,9 @@
-import { ApiError } from './ApiError';
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';
-import { CancelablePromise } from './CancelablePromise';
import type { OnCancel } from './CancelablePromise';
import type { OpenAPIConfig } from './OpenAPI';
+import { ApiError } from './ApiError';
+import { CancelablePromise } from './CancelablePromise';
export const isString = (value: unknown): value is string => {
return typeof value === 'string';
diff --git a/packages/client/src/generated/services.gen.ts b/packages/client/src/generated/services.gen.ts
index 7e78bdc9..3c70810f 100644
--- a/packages/client/src/generated/services.gen.ts
+++ b/packages/client/src/generated/services.gen.ts
@@ -1,9 +1,9 @@
// This file is auto-generated by @hey-api/openapi-ts
import type { CancelablePromise } from './core/CancelablePromise';
+import type { $OpenApiTs } from './types.gen';
import { OpenAPI } from './core/OpenAPI';
import { request as __request } from './core/request';
-import type { $OpenApiTs } from './types.gen';
export class SearchService {
/**
diff --git a/packages/config/eslint/svelte.js b/packages/config/eslint/svelte.js
index 1079fbd3..fa992495 100644
--- a/packages/config/eslint/svelte.js
+++ b/packages/config/eslint/svelte.js
@@ -1,8 +1,9 @@
+import eslintPluginSvelte from 'eslint-plugin-svelte';
import globals from 'globals';
+import svelte from 'svelte-eslint-parser';
import tseslint from 'typescript-eslint';
-import eslintPluginSvelte from 'eslint-plugin-svelte';
+
import eslintTypeScript from './typescript.js';
-import svelte from 'svelte-eslint-parser';
/** @type {import('eslint').Linter.FlatConfig[]} */
export default tseslint.config(
diff --git a/packages/config/eslint/typescript.js b/packages/config/eslint/typescript.js
index 6ba3903d..41eabbd2 100644
--- a/packages/config/eslint/typescript.js
+++ b/packages/config/eslint/typescript.js
@@ -1,7 +1,7 @@
import eslint from '@eslint/js';
+import prettier from 'eslint-config-prettier';
import globals from 'globals';
import tseslint from 'typescript-eslint';
-import prettier from 'eslint-config-prettier';
/** @type {import('eslint').Linter.FlatConfig[]} */
export default tseslint.config(
diff --git a/packages/config/package.json b/packages/config/package.json
index 4e79bf59..6bffb5ef 100644
--- a/packages/config/package.json
+++ b/packages/config/package.json
@@ -17,16 +17,17 @@
"format": "prettier --write ."
},
"devDependencies": {
+ "@ianvs/prettier-plugin-sort-imports": "^4.2.1",
"@tailwindcss/forms": "^0.5.7",
- "eslint": "^9.1.0",
+ "eslint": "^9.1.1",
"eslint-config-prettier": "^9.1.0",
- "eslint-plugin-svelte": "^2.37.0",
+ "eslint-plugin-svelte": "^2.38.0",
"globals": "^15.0.0",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.5.14",
- "svelte-eslint-parser": "^0.34.1",
+ "svelte-eslint-parser": "^0.35.0",
"tailwindcss": "^3.4.3",
- "typescript-eslint": "^7.7.0"
+ "typescript-eslint": "^7.7.1"
}
}
diff --git a/packages/config/prettier/base.js b/packages/config/prettier/base.js
index 7a8e79cd..99a032ee 100644
--- a/packages/config/prettier/base.js
+++ b/packages/config/prettier/base.js
@@ -3,5 +3,30 @@ export default {
useTabs: true,
singleQuote: true,
trailingComma: 'none',
- printWidth: 100
+ printWidth: 100,
+ plugins: ['@ianvs/prettier-plugin-sort-imports'],
+ importOrder: [
+ '^(node:)',
+ '',
+ '',
+ '',
+ '',
+ '',
+ '^@yd/(.*)$',
+ '^@yd/(.*)$',
+ '',
+ '^$app/(.*)$',
+ '^$app/(.*)$',
+ '^$lib/(.*)$',
+ '^$lib/(.*)$',
+ '^~(.*)$',
+ '^~(.*)$',
+ '^~/(.*)$',
+ '^~/(.*)$',
+ '^@/(.*)$',
+ '^@/(.*)$',
+ '^[.]',
+ '^[.]'
+ ],
+ importOrderTypeScriptVersion: '5.0.0'
};
diff --git a/packages/config/prettier/svelte.js b/packages/config/prettier/svelte.js
index da629306..6b4a6a8a 100644
--- a/packages/config/prettier/svelte.js
+++ b/packages/config/prettier/svelte.js
@@ -3,6 +3,6 @@ import base from './base.js';
/** @type {import("prettier").Config} */
export default {
...base,
- plugins: ['prettier-plugin-svelte', 'prettier-plugin-tailwindcss'],
+ plugins: [...base.plugins, 'prettier-plugin-svelte', 'prettier-plugin-tailwindcss'],
overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }]
};
diff --git a/packages/config/tailwind/base.js b/packages/config/tailwind/base.js
index 4180ef84..8a25b238 100644
--- a/packages/config/tailwind/base.js
+++ b/packages/config/tailwind/base.js
@@ -1,5 +1,5 @@
-import colors from 'tailwindcss/colors';
import forms from '@tailwindcss/forms';
+import colors from 'tailwindcss/colors';
/** @type {import('tailwindcss').Config} */
export default {
diff --git a/packages/ui/src/lib/components/ActionIcon.svelte b/packages/ui/src/lib/components/ActionIcon.svelte
index 7f77a21b..17afbb58 100644
--- a/packages/ui/src/lib/components/ActionIcon.svelte
+++ b/packages/ui/src/lib/components/ActionIcon.svelte
@@ -1,5 +1,6 @@
diff --git a/packages/ui/src/lib/components/theme/store.ts b/packages/ui/src/lib/components/theme/store.ts
index 1dcf3050..1c654320 100644
--- a/packages/ui/src/lib/components/theme/store.ts
+++ b/packages/ui/src/lib/components/theme/store.ts
@@ -1,4 +1,5 @@
import { writable } from 'svelte/store';
+
import { browser } from '../../utilities';
type Theme = 'dark' | 'light';
diff --git a/packages/ui/src/lib/components/toast/Toast.svelte b/packages/ui/src/lib/components/toast/Toast.svelte
index 1d1228ec..abb87eeb 100644
--- a/packages/ui/src/lib/components/toast/Toast.svelte
+++ b/packages/ui/src/lib/components/toast/Toast.svelte
@@ -1,5 +1,6 @@