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

Commit 1080636

Browse files
authored
Update no-use-before-declare docs (#3520)
1 parent b5297ad commit 1080636

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/rules/noUseBeforeDeclareRule.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ export class Rule extends Lint.Rules.TypedRule {
2525
ruleName: "no-use-before-declare",
2626
description: "Disallows usage of variables before their declaration.",
2727
descriptionDetails: Lint.Utils.dedent`
28-
This rule is primarily useful when using the \`var\` keyword -
29-
the compiler will detect if a \`let\` and \`const\` variable is used before it is declared.`,
28+
This rule is primarily useful when using the \`var\` keyword since the compiler will
29+
automatically detect if a block-scoped \`let\` and \`const\` variable is used before
30+
declaration. Since most modern TypeScript doesn't use \`var\`, this rule is generally
31+
discouraged and is kept around for legacy purposes. It is slow to compute, is not
32+
enabled in the built-in configuration presets, and should not be used to inform TSLint
33+
design decisions.
34+
`,
3035
optionsDescription: "Not configurable.",
3136
options: null,
3237
optionExamples: [true],

0 commit comments

Comments
 (0)