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

`group-exports` does not handle aliased exports/index files #62

Closed brandongregoryscott closed 1 year ago

brandongregoryscott commented 1 year ago

In an index file that is re-exporting a module with an aliased name, such as:

export { default as useSiteMetadata } from "./use-site-metadata";
export { default as useCategoriesList } from "./use-categories-list";
export { default as useTagsList } from "./use-tags-list";

The result is:

export { default, default, default };

which is obviously not intended! I didn't really account for index files with this rule, either. Perhaps we add an option to skip index files by default.