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
no-empty-file
: Fix false positive with triple-slash directives
#1605
no-empty-file
: Fix false positive with triple-slash directives
#1605
Conversation
I think it's possible to get all comments and test that it's start with a |
@fisker I am trying the "starts with |
I 'm not familiar with this syntax, but I see this line https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/rules/triple-slash-reference.ts#L96 Maybe we can ignore file, if
|
Wait, I don't think |
@fisker yeah, never mind. I was making it more difficult than it needed to be. PR has been updated. |
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.
Good job! Thank you!
@fisker you're welcome! |
no-empty-file
false positive with triple-slash directives.no-empty-file
: Fix false positive with triple-slash directives
The simplest fix seems to be to ignore
.d.ts
files as@babel/eslint-parser
and@typescript-eslint/parser
still view triple-slash directives as regular comments that produce an emptybody
.Fixes #1598