mirror of
https://github.com/m1ngsama/FUJI.git
synced 2025-12-25 02:56:38 +00:00
update lint
This commit is contained in:
parent
32d5204637
commit
b1d418cb8f
4 changed files with 16 additions and 8 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
"NBTCA",
|
"NBTCA",
|
||||||
"m_lfit",
|
"m_lfit",
|
||||||
"N3ptune",
|
"N3ptune",
|
||||||
"rehypePlugins"
|
"rehypePlugins",
|
||||||
|
"tseslint"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
|
// @ts-check
|
||||||
import globals from "globals"
|
import globals from "globals"
|
||||||
import eslint from "@eslint/js"
|
import eslint from "@eslint/js"
|
||||||
import eslintPluginAstro from "eslint-plugin-astro"
|
import eslintPluginAstro from "eslint-plugin-astro"
|
||||||
import stylistic from "@stylistic/eslint-plugin"
|
import stylistic from "@stylistic/eslint-plugin"
|
||||||
import cspellESLintPluginRecommended from "@cspell/eslint-plugin/recommended"
|
import cspellESLintPluginRecommended from "@cspell/eslint-plugin/recommended"
|
||||||
|
import tseslint from "typescript-eslint"
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
eslint.configs.recommended,
|
eslint.configs.recommended,
|
||||||
|
|
@ -18,6 +20,13 @@ export default [
|
||||||
files: ["*.{ts,tsx}"],
|
files: ["*.{ts,tsx}"],
|
||||||
parser: "@typescript-eslint/parser",
|
parser: "@typescript-eslint/parser",
|
||||||
},
|
},
|
||||||
|
...[
|
||||||
|
eslint.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
].map(conf => ({
|
||||||
|
...conf,
|
||||||
|
files: ["**/*.{ts,tsx}"],
|
||||||
|
})),
|
||||||
{
|
{
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
globals: {
|
globals: {
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,15 @@
|
||||||
// fullcalendar.tsx
|
import React from "react"
|
||||||
import React, { useState } from "react"
|
|
||||||
import FullCalendar from "@fullcalendar/react"
|
import FullCalendar from "@fullcalendar/react"
|
||||||
import dayGridPlugin from "@fullcalendar/daygrid" // a plugin!
|
import dayGridPlugin from "@fullcalendar/daygrid" // a plugin!
|
||||||
import iCalendarPlugin from "@fullcalendar/icalendar"
|
import iCalendarPlugin from "@fullcalendar/icalendar"
|
||||||
import "../../styles/calendar.css"
|
import "../../styles/calendar.css"
|
||||||
|
|
||||||
class CalendarComponment extends React.Component {
|
class CalendarComponent extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const calendarStyle = {
|
const calendarStyle = {
|
||||||
width: "80%",
|
width: "80%",
|
||||||
margin: "20px auto",
|
margin: "20px auto",
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={calendarStyle} className="calendar">
|
<div style={calendarStyle} className="calendar">
|
||||||
<FullCalendar
|
<FullCalendar
|
||||||
|
|
@ -20,7 +18,7 @@ class CalendarComponment extends React.Component {
|
||||||
url: "https://ical.nbtca.space/",
|
url: "https://ical.nbtca.space/",
|
||||||
format: "ics",
|
format: "ics",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
data.forEach(element => {
|
data.forEach((element) => {
|
||||||
element.color = element.title.includes("生日") ? "#fc7399" : "#5172dc"
|
element.color = element.title.includes("生日") ? "#fc7399" : "#5172dc"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -36,4 +34,4 @@ class CalendarComponment extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CalendarComponment
|
export default CalendarComponent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue