-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-unused-modules
: ignore flow type exports
#1906
no-unused-modules
: ignore flow type exports
#1906
Conversation
no-unused-modules
: ignore flow type importsno-unused-modules
: ignore flow type exports
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.
LGTM overall, just a few comments!
tests/src/rules/no-unused-modules.js
Outdated
], | ||
invalid: [ | ||
test({ | ||
options: unusedExportsTypescriptOptions, | ||
code: `export const b = 2;`, | ||
parser: parser, | ||
filename: testFilePath('./no-unused-modules/typescript/file-ts-b.ts'), | ||
filename: testFilePath('./no-unused-modules/typescript/file-ts-b-2.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.
is there a way we could rework these tests so we don't have to change these existing ones, and so "b-2" could have a more meaningful name for the new tests?
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.
I needed to split them into files exporting unused exports (the files ending with "-2") and the files exporting used exports (the files without "-2") because the existing tests was only actually testing the unused case. I will rename those with better names.
@@ -0,0 +1,3 @@ | |||
// @flow strict | |||
export type Bar = number; | |||
export interface BarInterface {}; |
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.
please ensure every file has a trailing newline
aec5361
to
5ade156
Compare
Fixes #1564 :