style: enable import order and format

This commit is contained in:
molvqingtai 2023-08-02 04:25:05 +08:00
parent 400f5603ba
commit 50c7b92e36
7 changed files with 11 additions and 10 deletions

View file

@ -32,6 +32,7 @@
"rules": {
"prettier/prettier": "error",
"react/prop-types": "off",
"import/order": "error",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-function-return-type": "off",

View file

@ -1,9 +1,9 @@
import { type FC, useState } from 'react'
import { Avatar, AvatarImage, AvatarFallback } from '@/components/ui/Avatar'
import { format } from 'date-fns'
import { FrownIcon, ThumbsUpIcon } from 'lucide-react'
import { Avatar, AvatarImage, AvatarFallback } from '@/components/ui/Avatar'
import LikeButton from '@/components/LikeButton'
import { FrownIcon, ThumbsUpIcon } from 'lucide-react'
export interface MessageProps {
data: {

View file

@ -1,8 +1,8 @@
import { type FC, type ChangeEvent, type KeyboardEvent } from 'react'
import { useRemeshDomain, useRemeshQuery, useRemeshSend } from 'remesh-react'
import { Textarea } from '@/components/ui/Textarea'
import { Markdown } from '@/components/ui/Markdown'
import { cn } from '@/utils'
import { useRemeshDomain, useRemeshQuery, useRemeshSend } from 'remesh-react'
import MessageInputDomain from '@/domain/MessageInput'
import { MESSAGE_MAX_LENGTH } from '@/constants'

View file

@ -1,7 +1,7 @@
import { cn } from '@/utils'
import { type FC } from 'react'
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { cn } from '@/utils'
export interface MarkdownProps {
children?: string

View file

@ -1,6 +1,6 @@
import { createElement } from '@/utils'
import { type ReactNode } from 'react'
import { createRoot, type Root } from 'react-dom/client'
import { createElement } from '@/utils'
export interface RootOptions {
mode?: ShadowRootMode

View file

@ -1,10 +1,10 @@
import React from 'react'
import App from './App'
import createShadowRoot from './createShadowRoot'
import style from './index.css?inline'
import { RemeshRoot } from 'remesh-react'
import { RemeshLogger } from 'remesh-logger'
import { Remesh } from 'remesh'
import App from './App'
import createShadowRoot from './createShadowRoot'
import style from './index.css?inline'
void (async () => {
const store = Remesh.store({

View file

@ -1,8 +1,8 @@
import { type FC } from 'react'
import { Button } from '@/components/ui/Button'
import { SmileIcon, CornerDownLeftIcon, ImageIcon } from 'lucide-react'
import MessageInput from '@/components/MessageInput'
import { useRemeshDomain, useRemeshEvent, useRemeshSend } from 'remesh-react'
import { Button } from '@/components/ui/Button'
import MessageInput from '@/components/MessageInput'
import MessageInputDomain from '@/domain/MessageInput'
const Footer: FC = () => {