update lint

This commit is contained in:
ClasWen 2024-05-18 21:28:50 +08:00
parent 32d5204637
commit b1d418cb8f
4 changed files with 16 additions and 8 deletions

View file

@ -12,6 +12,7 @@
"NBTCA",
"m_lfit",
"N3ptune",
"rehypePlugins"
"rehypePlugins",
"tseslint"
]
}

View file

@ -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: {

View file

@ -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 (
<div style={calendarStyle} className="calendar">
<FullCalendar
@ -20,7 +18,7 @@ class CalendarComponment extends React.Component {
url: "https://ical.nbtca.space/",
format: "ics",
success: function (data) {
data.forEach(element => {
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

View file

@ -36,4 +36,4 @@ export const otherMembers: Member[] = [
profile: "算法记录。",
avatar: "",
},
]
]