Skip to content

Commit a022baf

Browse files
committed
add unused flow interface test
1 parent 6fba7f0 commit a022baf

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
// @flow strict
2-
export type Bar = number;
2+
export type Bar = number;
3+
export interface BarInterface {};

tests/src/rules/no-unused-modules.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -932,11 +932,14 @@ describe('correctly report flow types', () => {
932932
test({
933933
options: unusedExportsOptions,
934934
code: `// @flow strict
935-
export type Bar = number;`,
935+
export type Bar = number;
936+
export interface BarInterface {};
937+
`,
936938
parser: require.resolve('babel-eslint'),
937939
filename: testFilePath('./no-unused-modules/flow/flow-1.js'),
938940
errors: [
939941
error(`exported declaration 'Bar' not used within other modules`),
942+
error(`exported declaration 'BarInterface' not used within other modules`),
940943
],
941944
}),
942945
],

0 commit comments

Comments
 (0)