From 186115cf7aed0358081f3a39befb3ade23289483 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 18 Jul 2018 10:56:44 -0400 Subject: [PATCH] tslint: Enable prefer-for-of This is not a big deal, but I think it makes the code a bit nicer. --- src/backend/mi_parse.ts | 3 +-- tslint.json | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/mi_parse.ts b/src/backend/mi_parse.ts index f8556f9..8d78025 100644 --- a/src/backend/mi_parse.ts +++ b/src/backend/mi_parse.ts @@ -93,8 +93,7 @@ export class MINode implements MIInfo { path = path.substr(target[0].length); if (current.length && typeof current != "string") { const found = []; - for (let i = 0; i < current.length; i++) { - const element = current[i]; + for (const element of current) { if (element[0] == target[1]) { found.push(element[1]); } diff --git a/tslint.json b/tslint.json index cfab942..631efc3 100644 --- a/tslint.json +++ b/tslint.json @@ -32,7 +32,6 @@ "one-variable-per-declaration": false, "only-arrow-functions": false, "ordered-imports": false, - "prefer-for-of": false, "quotemark": false, "radix": false, "semicolon": false,