Skip to content

Commit d9b1044

Browse files
authored
Merge pull request #266 from ComputerScienceHouse/ts4-eslint7
Updating eslint and typescript
2 parents a7904ea + 9181ba8 commit d9b1044

File tree

3 files changed

+38
-39
lines changed

3 files changed

+38
-39
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
angular.module('sm').filter('courseNum', function () {
22
return function (course: Course) {
33
if (course) {
4-
return (course.department.code ? course.department.code
5-
: course.department.number) + '-' + course.course
4+
const coursePrefix = course.department.code ? course.department.code : course.department.number
5+
return coursePrefix + '-' + course.course
66
}
77
}
88
})

assets/src/modules/sm/global.d.ts

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1+
/* eslint-disable no-unused-vars */
12
/* eslint-disable camelcase */
23
declare let angular: any
34

4-
declare interface Course {
5-
id: string
6-
sections: Section[]
7-
title: string
8-
courseNum: string
9-
course: string
10-
department: Department
11-
times: Time[]
12-
fromSelect: boolean
13-
selected: boolean
14-
description: string
15-
search
16-
}
17-
185
declare interface Department {
196
code: string
207
number: null
218
}
229

10+
declare interface Bldg {
11+
code: string;
12+
number: string;
13+
}
14+
15+
declare interface Time {
16+
bldg: Bldg;
17+
room: string;
18+
day: string;
19+
start: string;
20+
end: string;
21+
off_campus: boolean;
22+
}
2323
declare interface Section {
2424
title: string;
2525
instructor: string;
@@ -35,19 +35,18 @@ declare interface Section {
3535
isError?: boolean
3636
selected?: boolean
3737
}
38-
39-
declare interface Time {
40-
bldg: Bldg;
41-
room: string;
42-
day: string;
43-
start: string;
44-
end: string;
45-
off_campus: boolean;
46-
}
47-
48-
declare interface Bldg {
49-
code: string;
50-
number: string;
38+
declare interface Course {
39+
id: string
40+
sections: Section[]
41+
title: string
42+
courseNum: string
43+
course: string
44+
department: Department
45+
times: Time[]
46+
fromSelect: boolean
47+
selected: boolean
48+
description: string
49+
search
5150
}
5251

5352
declare interface ResponseError {

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "schedulemaker",
3-
"version": "3.2.3",
3+
"version": "3.2.4",
44
"private": true,
55
"description": "A course database lookup tool and schedule building web application for use at Rochester Institute of Technology.",
66
"main": "index.php",
@@ -53,15 +53,15 @@
5353
"@types/angular": "1.5",
5454
"@types/google.analytics": "0.0.42",
5555
"@types/mousetrap": "^1.6.8",
56-
"@typescript-eslint/eslint-plugin": "^2.30.0",
57-
"@typescript-eslint/parser": "^2.30.0",
56+
"@typescript-eslint/eslint-plugin": "^4.33.0",
57+
"@typescript-eslint/parser": "^4.33.0",
5858
"del": "^6.0.0",
59-
"eslint": "^6.5.1",
60-
"eslint-config-standard": "^14.1.0",
61-
"eslint-plugin-import": "^2.18.2",
62-
"eslint-plugin-node": "^10.0.0",
63-
"eslint-plugin-promise": "^4.2.1",
64-
"eslint-plugin-standard": "^4.0.1",
59+
"eslint": "^7.32.0",
60+
"eslint-config-standard": "^16.0.3",
61+
"eslint-plugin-import": "^2.24.2",
62+
"eslint-plugin-node": "^11.1.0",
63+
"eslint-plugin-promise": "^5.1.0",
64+
"eslint-plugin-standard": "^5.0.0",
6565
"event-stream": "^4.0.1",
6666
"gulp": "^4.0.2",
6767
"gulp-concat": "^2.6.1",
@@ -77,7 +77,7 @@
7777
"gulp-typescript": "^5.0.1",
7878
"gulp-uglify": "^2.0.0",
7979
"install": "^0.13.0",
80-
"typescript": "^3.8.3",
80+
"typescript": "^4.4.3",
8181
"vinyl-paths": "^3.0.0"
8282
}
8383
}

0 commit comments

Comments
 (0)