Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
no-string-literal: Fix documentation (#2875)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-hanson authored and adidahiya committed Jun 5, 2017
1 parent 85e6469 commit d802bd7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rules/noStringLiteralRule.ts
Expand Up @@ -24,8 +24,13 @@ export class Rule extends Lint.Rules.AbstractRule {
/* tslint:disable:object-literal-sort-keys */
public static metadata: Lint.IRuleMetadata = {
ruleName: "no-string-literal",
description: "Disallows object access via string literals.",
rationale: "Encourages using strongly-typed property access.",
description: Lint.Utils.dedent`
Forbids unnecessary string literal property access.
Allows \`obj["prop-erty"]\` (can't be a regular property access).
Disallows \`obj["property"]\` (should be \`obj.property\`).`,
rationale: Lint.Utils.dedent`
If \`--noImplicitAny\` is turned off,
property access via a string literal will be 'any' if the property does not exist.`,
optionsDescription: "Not configurable.",
options: null,
optionExamples: [true],
Expand Down

0 comments on commit d802bd7

Please sign in to comment.