mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Use ESLint to ensure that export
s 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:
parent
7f199e7017
commit
81525fd446
37 changed files with 178 additions and 166 deletions
|
@ -3480,7 +3480,7 @@ const PDFPrintServiceFactory = {
|
|||
};
|
||||
|
||||
export {
|
||||
PDFViewerApplication,
|
||||
DefaultExternalServices,
|
||||
PDFPrintServiceFactory,
|
||||
PDFViewerApplication,
|
||||
};
|
||||
|
|
|
@ -238,10 +238,10 @@ class IL10n {
|
|||
}
|
||||
|
||||
export {
|
||||
IPDFLinkService,
|
||||
IPDFHistory,
|
||||
IRenderableView,
|
||||
IPDFTextLayerFactory,
|
||||
IPDFAnnotationLayerFactory,
|
||||
IL10n,
|
||||
IPDFAnnotationLayerFactory,
|
||||
IPDFHistory,
|
||||
IPDFLinkService,
|
||||
IPDFTextLayerFactory,
|
||||
IRenderableView,
|
||||
};
|
||||
|
|
|
@ -804,4 +804,4 @@ function isDestArraysEqual(firstDest, secondDest) {
|
|||
return true;
|
||||
}
|
||||
|
||||
export { PDFHistory, isDestHashesEqual, isDestArraysEqual };
|
||||
export { isDestArraysEqual, isDestHashesEqual, PDFHistory };
|
||||
|
|
|
@ -183,4 +183,4 @@ class PDFRenderingQueue {
|
|||
}
|
||||
}
|
||||
|
||||
export { RenderingStates, PDFRenderingQueue };
|
||||
export { PDFRenderingQueue, RenderingStates };
|
||||
|
|
|
@ -517,4 +517,4 @@ class PDFSidebar {
|
|||
}
|
||||
}
|
||||
|
||||
export { SidebarView, PDFSidebar };
|
||||
export { PDFSidebar };
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -463,4 +463,4 @@ class DefaultTextLayerFactory {
|
|||
}
|
||||
}
|
||||
|
||||
export { TextLayerBuilder, DefaultTextLayerFactory };
|
||||
export { DefaultTextLayerFactory, TextLayerBuilder };
|
||||
|
|
|
@ -1031,46 +1031,46 @@ function getActiveOrFocusedElement() {
|
|||
}
|
||||
|
||||
export {
|
||||
animationStarted,
|
||||
approximateFraction,
|
||||
AutoPrintRegExp,
|
||||
backtrackBeforeAllVisibleElements, // only exported for testing
|
||||
binarySearchFirstItem,
|
||||
CSS_UNITS,
|
||||
DEFAULT_SCALE_VALUE,
|
||||
DEFAULT_SCALE,
|
||||
MIN_SCALE,
|
||||
MAX_SCALE,
|
||||
UNKNOWN_SCALE,
|
||||
MAX_AUTO_SCALE,
|
||||
SCROLLBAR_PADDING,
|
||||
VERTICAL_PADDING,
|
||||
DEFAULT_SCALE_VALUE,
|
||||
EventBus,
|
||||
getActiveOrFocusedElement,
|
||||
getOutputScale,
|
||||
getPageSizeInches,
|
||||
getPDFFileNameFromURL,
|
||||
getVisibleElements,
|
||||
isPortraitOrientation,
|
||||
isValidRotation,
|
||||
isValidScrollMode,
|
||||
isValidSpreadMode,
|
||||
isPortraitOrientation,
|
||||
PresentationModeState,
|
||||
SidebarView,
|
||||
RendererType,
|
||||
TextLayerMode,
|
||||
ScrollMode,
|
||||
SpreadMode,
|
||||
NullL10n,
|
||||
EventBus,
|
||||
ProgressBar,
|
||||
getPDFFileNameFromURL,
|
||||
noContextMenuHandler,
|
||||
parseQueryString,
|
||||
backtrackBeforeAllVisibleElements, // only exported for testing
|
||||
getVisibleElements,
|
||||
roundToDivide,
|
||||
getPageSizeInches,
|
||||
approximateFraction,
|
||||
getOutputScale,
|
||||
scrollIntoView,
|
||||
watchScroll,
|
||||
binarySearchFirstItem,
|
||||
normalizeWheelEventDirection,
|
||||
normalizeWheelEventDelta,
|
||||
animationStarted,
|
||||
WaitOnType,
|
||||
waitOnEventOrTimeout,
|
||||
MAX_AUTO_SCALE,
|
||||
MAX_SCALE,
|
||||
MIN_SCALE,
|
||||
moveToEndOfArray,
|
||||
getActiveOrFocusedElement,
|
||||
noContextMenuHandler,
|
||||
normalizeWheelEventDelta,
|
||||
normalizeWheelEventDirection,
|
||||
NullL10n,
|
||||
parseQueryString,
|
||||
PresentationModeState,
|
||||
ProgressBar,
|
||||
RendererType,
|
||||
roundToDivide,
|
||||
SCROLLBAR_PADDING,
|
||||
scrollIntoView,
|
||||
ScrollMode,
|
||||
SidebarView,
|
||||
SpreadMode,
|
||||
TextLayerMode,
|
||||
UNKNOWN_SCALE,
|
||||
VERTICAL_PADDING,
|
||||
waitOnEventOrTimeout,
|
||||
WaitOnType,
|
||||
watchScroll,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue