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 #553

Closed
wants to merge 1 commit into from
Closed
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
44 changes: 22 additions & 22 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 All @@ -8,7 +8,7 @@
import Typewriter from 'typewriter-effect'
import Marquee from 'react-fast-marquee'
import Masonry, { ResponsiveMasonry } from 'react-responsive-masonry'
import useDetectScroll, { Direction } from '@smakss/react-scroll-direction'

Check warning on line 11 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused import

Unused import specifier Direction
import FixTabPanel from '@stateless/FixTabPanel'
import TypedText from '@stateless/TypedText'
import ReMarkdown from '@stateless/ReMarkdown'
Expand Down Expand Up @@ -47,13 +47,13 @@
import firstImage from '@assets/images/88-300x160.jpg'
import secondImage from '@assets/images/2-300x160.jpg'

import { oneApiChat, prettyObject, randomNum } from '@utils/aidFn'

Check warning on line 50 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused import

Unused import specifier randomNum
import { fireConfetti } from '@utils/confetti'
import styles from './index.module.less'

const boxCount = Array.apply(null, Array(10))

Check warning on line 54 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused local symbol

Unused constant boxCount

const code = {

Check warning on line 56 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused local symbol

Unused constant code
fileName: './explanations.ts',
code: `export const = explanations = {
main : "This component needs more than the default code block to be displayed"
Expand Down Expand Up @@ -281,7 +281,7 @@
hoverFillColor="#222"
/>
</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 @@ -362,14 +362,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 style={{ margin: '20px 0' }}>
Expand Down Expand Up @@ -410,16 +410,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 @@ -444,7 +444,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 447 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 Expand Up @@ -496,20 +496,20 @@
<section style={{ margin: 20 }}>
<ResponsiveMasonry columnsCountBreakPoints={{ 350: 1, 750: 2, 900: 6 }}>
<Masonry gutter="10px">
<section style={{ height: 100, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 200, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 200, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 100, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 200, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 100, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 100, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 200, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 100, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 200, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 200, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 100, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 200, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 100, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 100, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 200, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, border: '1px solid #ccc', background: '#aaa' }} />
</Masonry>
</ResponsiveMasonry>
</section>
Expand Down
Loading