Function ScheduleViewer
has 114 lines of code (exceeds 50 allowed). Consider refactoring.
export function ScheduleViewer() {
const [choice, setChoice] = useLocalStorage<ModeChoice>('choice', ModeChoice.UNDEFINED)
const [{ groups, tutors }, setQueryOptions] = useLocalStorage<AltapiQueryOptions>(
'queryOptions',
Function UniversalPicker
has 97 lines of code (exceeds 50 allowed). Consider refactoring.
export default function UniversalPicker(props: UniversalPickerProps<string>) {
const formik = useFormik({
initialValues: {
valueSearch: '',
},
Function UniversalPicker
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
export default function UniversalPicker(props: UniversalPickerProps<string>) {
const formik = useFormik({
initialValues: {
valueSearch: '',
},
Function AppHome
has 62 lines of code (exceeds 50 allowed). Consider refactoring.
export function AppHome() {
return (
<Container sm>
<Col>
<Spacer />
Function ScheduleViewer
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
export function ScheduleViewer() {
const [choice, setChoice] = useLocalStorage<ModeChoice>('choice', ModeChoice.UNDEFINED)
const [{ groups, tutors }, setQueryOptions] = useLocalStorage<AltapiQueryOptions>(
'queryOptions',
Function Scrappers
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
export function Scrappers() {
const { data, error, isLoading, isError } = useQuery('scrappers', getScrappers, {
refetchInterval: 5_000,
retry: false,
})
Function ScheduleTimeline
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
export function ScheduleTimeline({
date,
queryData,
choice,
dontPrintSummary,
Function updateOneEntry
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
async updateOneEntry(htmlId: string, changeHash: string, entry: ScheduleEntryDto) {
const previous = await this.timetableModel.findOne({
'entry.groups': entry.groups,
'entry.begin': entry.begin,
'entry.code': entry.code,
Avoid too many return
statements within this function.
return <p>Ayo?</p>