From ec0c2cf1362d7b1353f5c07800ff9fc96427d8c0 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 7 May 2024 18:17:31 +0300 Subject: [PATCH] isorted-fmt --- biome.json | 37 +++---------------- package.json | 6 +-- src/components/App.tsx | 2 +- src/components/Article/FullArticle.tsx | 2 +- .../Views/AllAuthors/AllAuthors.tsx | 2 +- src/components/Views/AllTopics/AllTopics.tsx | 2 +- src/components/Views/Author/Author.tsx | 2 +- src/components/Views/Feed/Feed.tsx | 2 +- src/components/Views/Topic.tsx | 2 +- src/components/_shared/Image/Image.tsx | 2 +- src/components/_shared/PageLayout.tsx | 2 +- src/context/meta.tsx | 4 +- src/pages/create.page.tsx | 2 +- vite.config.ts | 2 +- 14 files changed, 21 insertions(+), 48 deletions(-) diff --git a/biome.json b/biome.json index 30d953a8..7b211ccc 100644 --- a/biome.json +++ b/biome.json @@ -1,21 +1,8 @@ { "$schema": "https://biomejs.dev/schemas/1.5.3/schema.json", "files": { - "include": [ - "*.tsx", - "*.ts", - "*.js", - "*.json" - ], - "ignore": [ - "./dist", - "./node_modules", - ".husky", - "docs", - "gen", - "*.gen.ts", - "*.d.ts" - ] + "include": ["*.tsx", "*.ts", "*.js", "*.json"], + "ignore": ["./dist", "./node_modules", ".husky", "docs", "gen", "*.gen.ts", "*.d.ts"] }, "vcs": { "defaultBranch": "dev", @@ -23,19 +10,13 @@ }, "organizeImports": { "enabled": true, - "ignore": [ - "./api", - "./gen" - ] + "ignore": ["./api", "./gen"] }, "formatter": { "indentStyle": "space", "indentWidth": 2, "lineWidth": 108, - "ignore": [ - "./src/graphql/schema", - "./gen" - ] + "ignore": ["./src/graphql/schema", "./gen"] }, "javascript": { "formatter": { @@ -48,13 +29,7 @@ } }, "linter": { - "ignore": [ - "*.scss", - "*.md", - ".DS_Store", - "*.svg", - "*.d.ts" - ], + "ignore": ["*.scss", "*.md", ".DS_Store", "*.svg", "*.d.ts"], "enabled": true, "rules": { "all": true, @@ -99,4 +74,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 707221bc..289d1149 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "hygen": "HYGEN_TMPLS=gen hygen", "postinstall": "npm run codegen && npx patch-package", "check:code": "npx @biomejs/biome check src --log-kind=compact --verbose", - "check:code:fix": "npx @biomejs/biome lint src --log-kind=compact", + "check:code:fix": "npx @biomejs/biome check . --apply", "lint": "npm run lint:code && stylelint **/*.{scss,css}", "lint:code": "npx @biomejs/biome lint src --log-kind=compact --verbose", "lint:code:fix": "npx @biomejs/biome lint src --apply-unsafe --log-kind=compact --verbose", @@ -140,7 +140,5 @@ "y-prosemirror": "1.2.2", "yjs": "13.6.12" }, - "trustedDependencies": [ - "@biomejs/biome" - ] + "trustedDependencies": ["@biomejs/biome"] } diff --git a/src/components/App.tsx b/src/components/App.tsx index 55a56f81..00b5dfa9 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1,8 +1,8 @@ import type { PageProps, RootSearchParams } from '../pages/types' -import { Meta, MetaProvider } from '../context/meta' import { Component, createEffect, createMemo } from 'solid-js' import { Dynamic } from 'solid-js/web' +import { Meta, MetaProvider } from '../context/meta' import { ConfirmProvider } from '../context/confirm' import { ConnectProvider } from '../context/connect' diff --git a/src/components/Article/FullArticle.tsx b/src/components/Article/FullArticle.tsx index 78bcca55..eb10ea09 100644 --- a/src/components/Article/FullArticle.tsx +++ b/src/components/Article/FullArticle.tsx @@ -2,11 +2,11 @@ import type { Author, Shout, Topic } from '../../graphql/schema/core.gen' import { getPagePath } from '@nanostores/router' import { createPopper } from '@popperjs/core' -import { Link, Meta } from '../../context/meta' import { clsx } from 'clsx' import { install } from 'ga-gtag' import { For, Show, createEffect, createMemo, createSignal, on, onCleanup, onMount } from 'solid-js' import { isServer } from 'solid-js/web' +import { Link, Meta } from '../../context/meta' import { useLocalize } from '../../context/localize' import { useReactions } from '../../context/reactions' diff --git a/src/components/Views/AllAuthors/AllAuthors.tsx b/src/components/Views/AllAuthors/AllAuthors.tsx index c3027d2c..38d1742a 100644 --- a/src/components/Views/AllAuthors/AllAuthors.tsx +++ b/src/components/Views/AllAuthors/AllAuthors.tsx @@ -1,8 +1,8 @@ import type { Author } from '../../../graphql/schema/core.gen' -import { Meta } from '../../../context/meta' import { clsx } from 'clsx' import { For, Show, createMemo, createSignal } from 'solid-js' +import { Meta } from '../../../context/meta' import { useLocalize } from '../../../context/localize' import { useRouter } from '../../../stores/router' diff --git a/src/components/Views/AllTopics/AllTopics.tsx b/src/components/Views/AllTopics/AllTopics.tsx index ecf35fd3..26dfe848 100644 --- a/src/components/Views/AllTopics/AllTopics.tsx +++ b/src/components/Views/AllTopics/AllTopics.tsx @@ -1,9 +1,9 @@ import type { Topic } from '../../../graphql/schema/core.gen' -import { Meta } from '../../../context/meta' import { clsx } from 'clsx' import { For, Show, createEffect, createMemo, createSignal } from 'solid-js' import { useLocalize } from '../../../context/localize' +import { Meta } from '../../../context/meta' import { useTopics } from '../../../context/topics' import { useRouter } from '../../../stores/router' import { capitalize } from '../../../utils/capitalize' diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx index 8bc68e37..79140961 100644 --- a/src/components/Views/Author/Author.tsx +++ b/src/components/Views/Author/Author.tsx @@ -1,9 +1,9 @@ import type { Author, Reaction, Shout, Topic } from '../../../graphql/schema/core.gen' import { getPagePath } from '@nanostores/router' -import { Meta, Title } from '../../../context/meta' import { clsx } from 'clsx' import { For, Match, Show, Switch, createEffect, createMemo, createSignal, on, onMount } from 'solid-js' +import { Meta, Title } from '../../../context/meta' import { useFollowing } from '../../../context/following' import { useLocalize } from '../../../context/localize' diff --git a/src/components/Views/Feed/Feed.tsx b/src/components/Views/Feed/Feed.tsx index f73fdf46..b2fc5dfe 100644 --- a/src/components/Views/Feed/Feed.tsx +++ b/src/components/Views/Feed/Feed.tsx @@ -1,9 +1,9 @@ import { getPagePath } from '@nanostores/router' -import { Meta } from '../../../context/meta' import { clsx } from 'clsx' import { For, Show, createEffect, createMemo, createSignal, on, onMount } from 'solid-js' import { useLocalize } from '../../../context/localize' +import { Meta } from '../../../context/meta' import { useReactions } from '../../../context/reactions' import { useSession } from '../../../context/session' import { useTopics } from '../../../context/topics' diff --git a/src/components/Views/Topic.tsx b/src/components/Views/Topic.tsx index 76fcb30f..d788d1f6 100644 --- a/src/components/Views/Topic.tsx +++ b/src/components/Views/Topic.tsx @@ -1,8 +1,8 @@ import { LoadShoutsOptions, Shout, Topic } from '../../graphql/schema/core.gen' -import { Meta } from '../../context/meta' import { clsx } from 'clsx' import { For, Show, createEffect, createMemo, createSignal, on, onMount } from 'solid-js' +import { Meta } from '../../context/meta' import { useLocalize } from '../../context/localize' import { useTopics } from '../../context/topics' diff --git a/src/components/_shared/Image/Image.tsx b/src/components/_shared/Image/Image.tsx index 6b4d8346..bfb5a6d3 100644 --- a/src/components/_shared/Image/Image.tsx +++ b/src/components/_shared/Image/Image.tsx @@ -1,7 +1,7 @@ import type { JSX } from 'solid-js' -import { Link } from '../../../context/meta' import { splitProps } from 'solid-js' +import { Link } from '../../../context/meta' import { getImageUrl } from '../../../utils/getImageUrl' diff --git a/src/components/_shared/PageLayout.tsx b/src/components/_shared/PageLayout.tsx index 71692348..de35813e 100644 --- a/src/components/_shared/PageLayout.tsx +++ b/src/components/_shared/PageLayout.tsx @@ -1,8 +1,8 @@ import type { JSX } from 'solid-js' -import { Title } from '../../context/meta' import { clsx } from 'clsx' import { Show, createEffect, createSignal } from 'solid-js' +import { Title } from '../../context/meta' import { Footer } from '../Discours/Footer' import { Header } from '../Nav/Header' diff --git a/src/context/meta.tsx b/src/context/meta.tsx index fdea7dca..c09f0dbd 100644 --- a/src/context/meta.tsx +++ b/src/context/meta.tsx @@ -1,11 +1,11 @@ import { Component, + JSX, + ParentComponent, createContext, createRenderEffect, createSignal, - JSX, onCleanup, - ParentComponent, useContext, } from 'solid-js' import { isServer, spread } from 'solid-js/web' diff --git a/src/pages/create.page.tsx b/src/pages/create.page.tsx index 65ebe26d..833d328e 100644 --- a/src/pages/create.page.tsx +++ b/src/pages/create.page.tsx @@ -1,6 +1,6 @@ import { redirectPage } from '@nanostores/router' -import { Meta } from '../context/meta' import { clsx } from 'clsx' +import { Meta } from '../context/meta' import { AuthGuard } from '../components/AuthGuard' import { Button } from '../components/_shared/Button' diff --git a/vite.config.ts b/vite.config.ts index 324e5161..f50a5bab 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ import ssrPlugin from 'vike/plugin' import { defineConfig } from 'vite' import mkcert from 'vite-plugin-mkcert' -import { nodePolyfills } from 'vite-plugin-node-polyfills'; +import { nodePolyfills } from 'vite-plugin-node-polyfills' import sassDts from 'vite-plugin-sass-dts' import solidPlugin from 'vite-plugin-solid'