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

Commit 5a3a640

Browse files
waseemahmad31Josh Goldberg
authored and
Josh Goldberg
committed
Deprecate no-use-before-declare rule for typescript >= 2.9.0 (#4695)
1 parent be293b0 commit 5a3a640

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rules/noUseBeforeDeclareRule.ts

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18+
import * as semver from "semver";
1819
import { isBindingElement } from "tsutils";
1920
import * as ts from "typescript";
2021

@@ -42,6 +43,9 @@ export class Rule extends Lint.Rules.TypedRule {
4243
typescriptOnly: false,
4344
requiresTypeInfo: true,
4445
codeExamples,
46+
deprecationMessage: semver.gte(ts.version, "2.9.0-dev.0")
47+
? "Since TypeScript 2.9. Please use the built-in compiler checks instead."
48+
: undefined,
4549
};
4650
/* tslint:enable:object-literal-sort-keys */
4751

0 commit comments

Comments
 (0)