Conversation
|
||
constructor(sourceFile: ts.SourceFile, options: Lint.IOptions) { | ||
super(sourceFile, options); | ||
this.allowDeclarations = options.ruleArguments.indexOf(OPTION_ALLOW_DECLARATIONS) !== -1; |
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.
Why not use this.hasOption
here?
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.
options
is already in scope, so why not use it.
I don't have a strong opinion on this one
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.
Let's go with this.hasOption
for consistency
} | ||
} | ||
|
||
private getFunctionKeyword(node: ts.FunctionLikeDeclaration): ts.Node { |
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.
One-liner as of #1962
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.
thanks, I changed it to use the new helper function
|
||
constructor(sourceFile: ts.SourceFile, options: Lint.IOptions) { | ||
super(sourceFile, options); | ||
this.allowDeclarations = options.ruleArguments.indexOf(OPTION_ALLOW_DECLARATIONS) !== -1; |
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.
Let's go with this.hasOption
for consistency
PR checklist
What changes did you make?
allow-named-functions
allow-declarations
, but function declarations are also namedasync
orexport
ed functionsIs there anything you'd like reviewers to focus on?
The ci failure will go away when #1960 get's merged and this branch is rebased... and it's gone