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

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 { Highlight, themes } from 'prism-react-renderer'
import useCopyToClipboard from '@hooks/useCopyToClipboard'
import { CopyOutlined, CheckCircleTwoTone } from '@ant-design/icons'
Expand All @@ -7,16 +7,16 @@
const ShiCode = ({ preCode }) => {
const [copyToClipboard, copyResult] = useCopyToClipboard()
const handleClickCopy = () => {
copyToClipboard(preCode)

Check notice on line 10 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
2 changes: 1 addition & 1 deletion src/pages/layout/proSecNav/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react'

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

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package
import { Menu } from 'antd'
import { useNavigate, useLocation } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
Expand Down Expand Up @@ -43,9 +43,9 @@
const [rootSubmenuKeys] = useState(['/sub-act', '/sub-list', '/sub-error'])

useEffect(() => {
const selectedPathKey = pathname

Check warning on line 46 in src/pages/layout/proSecNav/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Redundant local variable

Local variable selectedPathKey is redundant
setSelectedKeys([selectedPathKey])
setOpenKeys(isOpenChange ? openKeys : (pathSubmenu[pathname] ?? openKeys))
setOpenKeys(isOpenChange ? openKeys : pathSubmenu[pathname] ?? openKeys)
}, [pathname, openKeys, isOpenChange])

const onOpenChange = (keys) => {
Expand Down
Loading