diff --git a/cspell.json b/cspell.json index 4d44576..b255964 100644 --- a/cspell.json +++ b/cspell.json @@ -12,6 +12,7 @@ "NBTCA", "m_lfit", "N3ptune", - "rehypePlugins" + "rehypePlugins", + "tseslint" ] } \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js index 1c79cd7..997dad6 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,8 +1,10 @@ +// @ts-check import globals from "globals" import eslint from "@eslint/js" import eslintPluginAstro from "eslint-plugin-astro" import stylistic from "@stylistic/eslint-plugin" import cspellESLintPluginRecommended from "@cspell/eslint-plugin/recommended" +import tseslint from "typescript-eslint" export default [ eslint.configs.recommended, @@ -18,6 +20,13 @@ export default [ files: ["*.{ts,tsx}"], parser: "@typescript-eslint/parser", }, + ...[ + eslint.configs.recommended, + ...tseslint.configs.recommended, + ].map(conf => ({ + ...conf, + files: ["**/*.{ts,tsx}"], + })), { languageOptions: { globals: { diff --git a/src/components/react/Calendar.tsx b/src/components/react/Calendar.tsx index 01ef70b..2ac3d5a 100644 --- a/src/components/react/Calendar.tsx +++ b/src/components/react/Calendar.tsx @@ -1,17 +1,15 @@ -// fullcalendar.tsx -import React, { useState } from "react" +import React from "react" import FullCalendar from "@fullcalendar/react" import dayGridPlugin from "@fullcalendar/daygrid" // a plugin! import iCalendarPlugin from "@fullcalendar/icalendar" import "../../styles/calendar.css" -class CalendarComponment extends React.Component { +class CalendarComponent extends React.Component { render() { const calendarStyle = { width: "80%", margin: "20px auto", } - return (
{ + data.forEach((element) => { element.color = element.title.includes("生日") ? "#fc7399" : "#5172dc" }) }, @@ -36,4 +34,4 @@ class CalendarComponment extends React.Component { } } -export default CalendarComponment +export default CalendarComponent diff --git a/src/store/member.ts b/src/store/member.ts index cd438ae..c029d7c 100644 --- a/src/store/member.ts +++ b/src/store/member.ts @@ -36,4 +36,4 @@ export const otherMembers: Member[] = [ profile: "算法记录。", avatar: "", }, -] \ No newline at end of file +]