ocket8888 commented on code in PR #7562:
URL: https://github.com/apache/trafficcontrol/pull/7562#discussion_r1224643838
##########
experimental/traffic-portal/package.json:
##########
@@ -116,4 +116,4 @@
"optionalDependencies": {
"@compodoc/compodoc": "^1.1.18"
}
-}
+}
Review Comment:
missing newline at eof - did ng-cli do that? I don't think it used to do that
##########
experimental/traffic-portal/src/app/core/statuses/status-details/status-details.component.ts:
##########
@@ -20,7 +20,10 @@ import { ActivatedRoute } from "@angular/router";
import { RequestStatus, ResponseStatus } from "trafficops-types";
import { ServerService } from "src/app/api";
-import { DecisionDialogComponent, DecisionDialogData } from
"src/app/shared/dialogs/decision-dialog/decision-dialog.component";
+import {
+ DecisionDialogComponent,
+ DecisionDialogData
+} from "src/app/shared/dialogs/decision-dialog/decision-dialog.component";
Review Comment:
did the upgrade make this change as a migration?
##########
experimental/traffic-portal/src/app/api/server.service.ts:
##########
@@ -198,7 +198,7 @@ export class ServerService extends APIService {
* docs.
*/
public async queueUpdates(server: number | ResponseServer):
Promise<ServerQueueResponse> {
- const id = typeof(server) === "number" ? server : server.id;
+ const id = typeof (server) === "number" ? server : server.id;
Review Comment:
did the upgrade make this change as a migration?
##########
experimental/traffic-portal/src/app/core/cache-groups/asns/table/asns-table.component.ts:
##########
@@ -122,7 +122,7 @@ export class AsnsTableComponent implements OnInit {
}
const data = evt.data;
switch(evt.action) {
- case "delete":
+ case "delete": {
Review Comment:
did the upgrade make this change as a migration?
##########
experimental/traffic-portal/src/app/guards/authenticated-guard.service.ts:
##########
@@ -12,15 +12,14 @@
* limitations under the License.
*/
import { Injectable } from "@angular/core";
-import type { CanActivate, CanLoad } from "@angular/router";
import { CurrentUserService } from
"src/app/shared/current-user/current-user.service";
/**
* AuthenticationGuard ensures that the user is logged in.
*/
@Injectable()
-export class AuthenticatedGuard implements CanActivate, CanLoad {
+export class AuthenticatedGuard {
Review Comment:
did the upgrade make this change as a migration?
##########
experimental/traffic-portal/src/app/utils/index.spec.ts:
##########
@@ -99,7 +99,7 @@ describe("Typing utility functions", () => {
it("should check homogenous array types correctly", () => {
const a = {};
expect(isArray(a)).toBeFalse();
- const b = new Array();
+ const b: unknown[] = [];
Review Comment:
did the upgrade make this change as a migration?
##########
experimental/traffic-portal/src/app/utils/order-by.ts:
##########
@@ -71,7 +71,7 @@ function cmpr(a: unknown, b: unknown): number {
* @param property Either a single property name or an array of property names
to sort by - in descending order of importance.
* @returns The sorted array
*/
-export function orderBy<T extends any>(value: Array<T>, property: string |
Array<string>): Array<T> {
+export function orderBy<T>(value: Array<T>, property: string | Array<string>):
Array<T> {
Review Comment:
did the upgrade make this change as a migration?
##########
experimental/traffic-portal/.eslintrc.json:
##########
@@ -37,10 +37,16 @@
"createDefaultProgram": true
},
"extends": [
- "plugin:@angular-eslint/ng-cli-compat",
-
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:@angular-eslint/recommended",
Review Comment:
This looks like it's adding at least `eslint:recommended`, not sure if the
other two are just new names for the ng-cli-compat sets. But adding new linter
rules seems out-of-scope for this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]