Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with Prettier and StandardJS #519

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/stateless/ShiCode/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'

Check failure on line 1 in src/components/stateless/ShiCode/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package
import { codeToHtml } from 'shiki'

Check warning on line 2 in src/components/stateless/ShiCode/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused import

Unused import { codeToHtml } from 'shiki'
import { Highlight, themes } from 'prism-react-renderer'
import useCopyToClipboard from '@hooks/useCopyToClipboard'
Expand All @@ -8,16 +8,16 @@
const ShiCode = ({ preCode }) => {
const [copyToClipboard, copyResult] = useCopyToClipboard()
const handleClickCopy = () => {
copyToClipboard(preCode)

Check notice on line 11 in src/components/stateless/ShiCode/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Result of method call returning a promise is ignored

Promise returned from copyToClipboard is ignored
}

return (
<div className="rounded-md bg-cyan-800 text-zinc-50">
<header className="grid grid-cols-6 gap-3 items-center px-4 py-3">
<div className="flex gap-1.5">
<div className="rounded-full h-3 w-3 bg-red-500"></div>
<div className="rounded-full h-3 w-3 bg-yellow-500"></div>
<div className="rounded-full h-3 w-3 bg-green-500"></div>
<div className="rounded-full h-3 w-3 bg-red-500" />
<div className="rounded-full h-3 w-3 bg-yellow-500" />
<div className="rounded-full h-3 w-3 bg-green-500" />
</div>
<div className="col-span-4 flex justify-center">
<div className="bg-transparent text-center text-gray-400 text-sm font-medium focus:outline-none">
Expand Down
16 changes: 8 additions & 8 deletions src/pages/home/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { version, useState, useRef } from 'react'

Check failure on line 1 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package
import { Input, Flex, Button } from 'antd'
import { SendOutlined } from '@ant-design/icons'
import { Atom, Merge, GitMerge, GitPullRequestArrow } from 'lucide-react'
Expand Down Expand Up @@ -186,7 +186,7 @@
<section style={{ marginBottom: 40 }}>
<AutoLink text="foo bar baz http://example.org bar https://github.com/wkylin/pro-react-admin" />
</section>
<section className={styles.line}></section>
<section className={styles.line} />
<section>
<AvatarCard avatar="https://picsum.photos/seed/picsum/300/160" text="Hi, I'm a developer." />
</section>
Expand Down Expand Up @@ -267,14 +267,14 @@
<AnimateOnScreen.DiyAnimation
from={{ opacity: 0, transform: 'translate(-100%, 0)' }}
to={{ opacity: 1, transform: 'translate(0, 0)' }}
triggerOnce={true}
triggerOnce
>
<img src="https://picsum.photos/360/200.jpg" alt="" />
</AnimateOnScreen.DiyAnimation>
</section>
<section style={{ marginBottom: 40, display: 'flex' }}>
<SpotlightCard className="my-spot" style={{ width: 360, height: 200, color: '#fff' }}>
<section></section>
<section />
</SpotlightCard>
</section>
<section
Expand Down Expand Up @@ -312,16 +312,16 @@
mask
</section>
<section style={{ marginBottom: 40 }}>
<button className={styles['button']} onClick={fireConfetti}>
<button className={styles.button} onClick={fireConfetti}>
<span className={styles['button-label']}>Click Me</span>
</button>
</section>

<section style={{ position: 'relative', margin: '80px 0 160px 100px' }}>
<div className={styles['circle-1']}></div>
<div className={styles['circle-2']}></div>
<div className={styles['circle-3']}></div>
<div className={styles['circle-4']}></div>
<div className={styles['circle-1']} />
<div className={styles['circle-2']} />
<div className={styles['circle-3']} />
<div className={styles['circle-4']} />
</section>

<section style={{ margin: 20 }} className={styles.eHElAY}>
Expand All @@ -346,7 +346,7 @@
<section style={{ width: 600, margin: '30px 0' }}>
<Input defaultValue={apiKey} placeholder="api key" onChange={changeApiKey} style={{ marginBottom: 20 }} />
<Flex align="center">
<Input.TextArea

Check notice on line 349 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component Input.TextArea
ref={textareaRef}
defaultValue={chatText}
placeholder="来,说点什么呗...Meta + Enter发送"
Expand Down
Loading