feat: update eslint & prettier rules

This commit is contained in:
HYana
2025-04-30 17:36:46 +08:00
parent d4af2d4326
commit 460e065eed
53 changed files with 2241 additions and 2102 deletions
@@ -1,15 +1,15 @@
import styles from "./pluginMarketCard.module.css";
import { GithubOutlined, StarOutlined } from "@ant-design/icons";
import { PluginMarketCardVO } from "@/app/home/plugins/plugin-market/plugin-market-card/PluginMarketCardVO";
import { Button } from "antd";
import styles from './pluginMarketCard.module.css';
import { GithubOutlined, StarOutlined } from '@ant-design/icons';
import { PluginMarketCardVO } from '@/app/home/plugins/plugin-market/plugin-market-card/PluginMarketCardVO';
import { Button } from 'antd';
export default function PluginMarketCardComponent({
cardVO
cardVO,
}: {
cardVO: PluginMarketCardVO;
}) {
function handleInstallClick(pluginId: string) {
console.log("Install plugin: ", pluginId);
console.log('Install plugin: ', pluginId);
}
return (
@@ -19,7 +19,7 @@ export default function PluginMarketCardComponent({
{/* left author */}
<div className={`${styles.fontGray}`}>{cardVO.author}</div>
{/* right icon */}
<GithubOutlined style={{ fontSize: "26px" }} type="setting" />
<GithubOutlined style={{ fontSize: '26px' }} type="setting" />
</div>
{/* content */}
<div className={`${styles.cardContent}`}>
@@ -30,13 +30,13 @@ export default function PluginMarketCardComponent({
<div className={`${styles.cardFooter}`}>
<div className={`${styles.linkSettingContainer}`}>
<div className={`${styles.link}`}>
<StarOutlined style={{ fontSize: "22px" }} />
<span style={{ paddingLeft: "5px" }}>{cardVO.starCount}</span>
<StarOutlined style={{ fontSize: '22px' }} />
<span style={{ paddingLeft: '5px' }}>{cardVO.starCount}</span>
</div>
</div>
<Button
type="primary"
size={"small"}
size={'small'}
onClick={() => {
handleInstallClick(cardVO.pluginId);
}}
@@ -1,29 +1,29 @@
export interface IPluginMarketCardVO {
pluginId: string;
author: string,
name: string,
description: string,
starCount: number,
githubURL: string,
version: string,
pluginId: string;
author: string;
name: string;
description: string;
starCount: number;
githubURL: string;
version: string;
}
export class PluginMarketCardVO implements IPluginMarketCardVO {
pluginId: string;
description: string;
name: string;
author: string;
githubURL: string;
starCount: number;
version: string;
pluginId: string;
description: string;
name: string;
author: string;
githubURL: string;
starCount: number;
version: string;
constructor(prop: IPluginMarketCardVO) {
this.description = prop.description
this.name = prop.name
this.author = prop.author
this.githubURL = prop.githubURL
this.starCount = prop.starCount
this.pluginId = prop.pluginId
this.version = prop.version
}
constructor(prop: IPluginMarketCardVO) {
this.description = prop.description;
this.name = prop.name;
this.author = prop.author;
this.githubURL = prop.githubURL;
this.starCount = prop.starCount;
this.pluginId = prop.pluginId;
this.version = prop.version;
}
}