-
Notifications
You must be signed in to change notification settings - Fork 885
Support outlawing /// <reference>
style imports.
#1139
Conversation
7776fd9
to
5999d7a
Compare
|
||
class NoReferenceWalker extends Lint.RuleWalker { | ||
public visitSourceFile(node: ts.SourceFile) { | ||
for (let ref of node.referencedFiles) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node.referencedFiles
only refers to <reference path=
statements, which is good
I like this rule too! This theme of rules that encourages using modern-TS is a good use-case for TSLint in my opinion. Couple notes: TS is adding a With all that in mind, I think we should change the name of this rule slightly, perhaps to |
@@ -90,6 +90,7 @@ | |||
"../src/rules/noInternalModuleRule.ts", | |||
"../src/rules/noInvalidThisRule.ts", | |||
"../src/rules/noNullKeywordRule.ts", | |||
"../src/rules/noReferenceRule.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/tsconfig.json
should also have a similar change, running grunt
should automatically update both files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
What about making this So |
The reasoning is that these are superseded by ES6 style imports, and the syntax overall isn't too pleasant.
👍 Agreed, keeping it as |
Cool. I think this is good to go then, unless I'm missing something. |
Agreed - thanks for the PR! |
The reasoning is that these are superseded by ES6 style imports, and the syntax
overall isn't too pleasant.