diff --git a/README.md b/README.md index 2f096324e1a..8801fc4cd4a 100644 --- a/README.md +++ b/README.md @@ -299,6 +299,7 @@ Core rules are included in the `tslint` package. * `no-duplicate-variable` disallows duplicate variable declarations in the same block scope. * `no-empty` disallows empty blocks. * `no-eval` disallows `eval` function invocations. +* `no-for-in-array` disallows iterating over an array with a for-in loop (requires type checking). * `no-inferrable-types` disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean. * `ignore-params` allows specifying an inferrable type as a function param * `no-internal-module` disallows internal `module` (use `namespace` instead). diff --git a/src/rules/noForInArrayRule.ts b/src/rules/noForInArrayRule.ts index 812616299ad..ebccb4e1a96 100644 --- a/src/rules/noForInArrayRule.ts +++ b/src/rules/noForInArrayRule.ts @@ -23,7 +23,7 @@ export class Rule extends Lint.Rules.TypedRule { /* tslint:disable:object-literal-sort-keys */ public static metadata: Lint.IRuleMetadata = { ruleName: "no-for-in-array", - description: "Disallows for-in loops over array types.", + description: "Disallows iterating over an array with a for-in loop.", descriptionDetails: Lint.Utils.dedent` A for-in loop (\`for (var k in o)\`) iterates over the properties of an Object.