brandongregoryscott / eslint-plugin-collation

ESLint plugin for making your code easier to read, with autofix and TypeScript support
https://eslint-plugin-collation.brandonscott.me
Apache License 2.0
4 stars 0 forks source link

`no-inline-exports` false positive in empty module export in `.d.ts` file #58

Closed brandongregoryscott closed 2 years ago

brandongregoryscott commented 2 years ago

Not sure exactly how to handle this one, but I feel like this shouldn't be reported. The empty export is necessary for the TS compiler to merge types with the base global.Window interface, though I couldn't tell you much more than that. (reference: https://bobbyhadz.com/blog/typescript-extend-window)

declare global {
    interface Window {
        analytics: import("@segment/analytics-next").Analytics;
    }
}

export {}; // error: Expected export to appear at end of file