feat: enable TS strict mode (#168)
* feat: enable TS strict mode * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: colors bug with default * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: text type errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors - add definite assignment assertion * fix: strict TS errors - add definite assignment assertion * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix(ESLint): error on no-explicit-any * fix: type annotations for any types * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors (and remove packages) * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * feat: enable React.StrictMode * fix: strict TS errors (done!) * fix: build error * fix: replace no-explicit-any assertions * refactor: cleanup * refactor: more cleanup * style: prettier --------- Co-authored-by: Lukas Zenick <lukas@utexas.edu> Co-authored-by: Razboy20 <razboy20@gmail.com>
This commit is contained in:
@@ -165,7 +165,7 @@ export class CourseCatalogScraper {
|
||||
.filter(Boolean);
|
||||
|
||||
return names.map(fullName => {
|
||||
const [lastName, rest] = fullName.split(',').map(s => s.trim());
|
||||
const [lastName, rest = ''] = fullName.split(',').map(s => s.trim());
|
||||
const [firstName, middleInitial] = rest.split(' ');
|
||||
|
||||
return new Instructor({
|
||||
@@ -334,13 +334,11 @@ export class CourseCatalogScraper {
|
||||
const schedule = new CourseSchedule();
|
||||
|
||||
for (let i = 0; i < dayLines.length; i += 1) {
|
||||
schedule.meetings.push(
|
||||
CourseSchedule.parse(
|
||||
dayLines[i].textContent || '',
|
||||
hourLines[i].textContent || '',
|
||||
locLines[i].textContent || ''
|
||||
)
|
||||
);
|
||||
const dayText = dayLines[i]?.textContent || '';
|
||||
const hourText = hourLines[i]?.textContent || '';
|
||||
const locationText = locLines[i]?.textContent || '';
|
||||
|
||||
schedule.meetings.push(CourseSchedule.parse(dayText, hourText, locationText));
|
||||
}
|
||||
|
||||
return schedule;
|
||||
|
||||
Reference in New Issue
Block a user