Closed
Description
In TypeScript, modules are TypeScript files that contain an import or export statement. If a file is not a module, it will be ignored by TypeScript. Sometimes a file doesn’t contain imports or exports for legitimate reasons. In this case, an empty export must be added. I.e. to augment an interface:
export {};
declare module '@appsemble/sdk' {
interface Parameters {
interval: number;
}
interface EventEmitters {
interval: never;
}
}
As soon as the file is modified to contain actual imports or exports, the empty export can be removed.
I’d like to propose a rule that reports empty exports if the file contains other imports / exports. This can be autofixable by removing the empty export. I’m willing to implement this.