Use ESLint to ensure that exports are sorted alphabetically

There's built-in ESLint rule, see `sort-imports`, to ensure that all `import`-statements are sorted alphabetically, since that often helps with readability.
Unfortunately there's no corresponding rule to sort `export`-statements alphabetically, however there's an ESLint plugin which does this; please see https://www.npmjs.com/package/eslint-plugin-sort-exports

The only downside here is that it's not automatically fixable, but the re-ordering is a one-time "cost" and the plugin will help maintain a *consistent* ordering of `export`-statements in the future.
*Note:* To reduce the possibility of introducing any errors here, the re-ordering was done by simply selecting the relevant lines and then using the built-in sort-functionality of my editor.
This commit is contained in:
Jonas Jenwald 2021-01-09 15:37:44 +01:00
parent 7f199e7017
commit 81525fd446
37 changed files with 178 additions and 166 deletions

View file

@ -37,20 +37,20 @@ const pdfjsVersion = PDFJSDev.eval("BUNDLE_VERSION");
const pdfjsBuild = PDFJSDev.eval("BUNDLE_BUILD");
export {
PDFViewer,
PDFSinglePageViewer,
PDFPageView,
PDFLinkService,
SimpleLinkService,
TextLayerBuilder,
DefaultTextLayerFactory,
AnnotationLayerBuilder,
DefaultAnnotationLayerFactory,
PDFHistory,
PDFFindController,
EventBus,
DefaultTextLayerFactory,
DownloadManager,
ProgressBar,
EventBus,
GenericL10n,
NullL10n,
PDFFindController,
PDFHistory,
PDFLinkService,
PDFPageView,
PDFSinglePageViewer,
PDFViewer,
ProgressBar,
SimpleLinkService,
TextLayerBuilder,
};