New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converted prefer-declare-function from TSLint to ESLint #538
Converted prefer-declare-function from TSLint to ESLint #538
Conversation
Bump @andrewbranch - is there any chance this & the other open TSLint->ESLint PRs be looked at soon, please? |
@JoshuaKGoldberg I work on these during my DT week but I don't think anybody else is. When everybody gets back I'll ask others to take time as well. |
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.
The rule should apply to all variable declarations, not just exported ones.
I'll make the change since it's a simple one and this PR has been unreviewed for a long time.
{ | ||
code: ` | ||
namespace N { | ||
export const example: () => void; |
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.
also needs to forbid const example: () => void
, without the export
create(context) { | ||
return { | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
"ExportNamedDeclaration > VariableDeclaration > VariableDeclarator"(node: TSESTree.VariableDeclarator) { |
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.
the type doesn't need to be exported to be an error.
I'll ship this tomorrow so I can create my fixup PR on DT right after. |
Continues the work from #489.