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
|
@ -2475,6 +2475,6 @@ export {
|
|||
Annotation,
|
||||
AnnotationBorderStyle,
|
||||
AnnotationFactory,
|
||||
MarkupAnnotation,
|
||||
getQuadPoints,
|
||||
MarkupAnnotation,
|
||||
};
|
||||
|
|
|
@ -1913,15 +1913,15 @@ class CFFCompiler {
|
|||
}
|
||||
|
||||
export {
|
||||
CFFStandardStrings,
|
||||
CFFParser,
|
||||
CFF,
|
||||
CFFHeader,
|
||||
CFFStrings,
|
||||
CFFIndex,
|
||||
CFFCharset,
|
||||
CFFTopDict,
|
||||
CFFPrivateDict,
|
||||
CFFCompiler,
|
||||
CFFFDSelect,
|
||||
CFFHeader,
|
||||
CFFIndex,
|
||||
CFFParser,
|
||||
CFFPrivateDict,
|
||||
CFFStandardStrings,
|
||||
CFFStrings,
|
||||
CFFTopDict,
|
||||
};
|
||||
|
|
|
@ -116,4 +116,4 @@ const ExpertSubsetCharset = [
|
|||
"periodinferior", "commainferior"
|
||||
];
|
||||
|
||||
export { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset };
|
||||
export { ExpertCharset, ExpertSubsetCharset, ISOAdobeCharset };
|
||||
|
|
|
@ -1055,4 +1055,4 @@ var CMapFactory = (function CMapFactoryClosure() {
|
|||
};
|
||||
})();
|
||||
|
||||
export { CMap, IdentityCMap, CMapFactory };
|
||||
export { CMap, CMapFactory, IdentityCMap };
|
||||
|
|
|
@ -323,17 +323,17 @@ function collectActions(xref, dict, eventType) {
|
|||
export {
|
||||
collectActions,
|
||||
escapePDFName,
|
||||
getLookupTableFactory,
|
||||
getArrayLookupTableFactory,
|
||||
MissingDataException,
|
||||
XRefEntryException,
|
||||
XRefParseException,
|
||||
getInheritableProperty,
|
||||
toRomanNumerals,
|
||||
getLookupTableFactory,
|
||||
isWhiteSpace,
|
||||
log2,
|
||||
MissingDataException,
|
||||
parseXFAPath,
|
||||
readInt8,
|
||||
readUint16,
|
||||
readUint32,
|
||||
isWhiteSpace,
|
||||
toRomanNumerals,
|
||||
XRefEntryException,
|
||||
XRefParseException,
|
||||
};
|
||||
|
|
|
@ -1956,11 +1956,11 @@ export {
|
|||
AES128Cipher,
|
||||
AES256Cipher,
|
||||
ARCFourCipher,
|
||||
CipherTransformFactory,
|
||||
PDF17,
|
||||
PDF20,
|
||||
calculateMD5,
|
||||
calculateSHA256,
|
||||
calculateSHA384,
|
||||
calculateSHA512,
|
||||
CipherTransformFactory,
|
||||
PDF17,
|
||||
PDF20,
|
||||
};
|
||||
|
|
|
@ -291,11 +291,11 @@ function getEncoding(encodingName) {
|
|||
}
|
||||
|
||||
export {
|
||||
WinAnsiEncoding,
|
||||
StandardEncoding,
|
||||
MacRomanEncoding,
|
||||
SymbolSetEncoding,
|
||||
ZapfDingbatsEncoding,
|
||||
ExpertEncoding,
|
||||
getEncoding,
|
||||
MacRomanEncoding,
|
||||
StandardEncoding,
|
||||
SymbolSetEncoding,
|
||||
WinAnsiEncoding,
|
||||
ZapfDingbatsEncoding,
|
||||
};
|
||||
|
|
|
@ -4013,11 +4013,11 @@ var CFFFont = (function CFFFontClosure() {
|
|||
})();
|
||||
|
||||
export {
|
||||
SEAC_ANALYSIS_ENABLED,
|
||||
ErrorFont,
|
||||
Font,
|
||||
FontFlags,
|
||||
ToUnicodeMap,
|
||||
IdentityToUnicodeMap,
|
||||
getFontType,
|
||||
IdentityToUnicodeMap,
|
||||
SEAC_ANALYSIS_ENABLED,
|
||||
ToUnicodeMap,
|
||||
};
|
||||
|
|
|
@ -1345,6 +1345,6 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
|
|||
export {
|
||||
isPDFFunction,
|
||||
PDFFunctionFactory,
|
||||
PostScriptEvaluator,
|
||||
PostScriptCompiler,
|
||||
PostScriptEvaluator,
|
||||
};
|
||||
|
|
|
@ -4556,4 +4556,4 @@ var getDingbatsGlyphsUnicode = getArrayLookupTableFactory(function () {
|
|||
];
|
||||
});
|
||||
|
||||
export { getGlyphsUnicode, getDingbatsGlyphsUnicode };
|
||||
export { getDingbatsGlyphsUnicode, getGlyphsUnicode };
|
||||
|
|
|
@ -250,10 +250,10 @@ class GlobalImageCache {
|
|||
}
|
||||
|
||||
export {
|
||||
LocalImageCache,
|
||||
GlobalImageCache,
|
||||
LocalColorSpaceCache,
|
||||
LocalFunctionCache,
|
||||
LocalGStateCache,
|
||||
LocalImageCache,
|
||||
LocalTilingPatternCache,
|
||||
GlobalImageCache,
|
||||
};
|
||||
|
|
|
@ -2602,4 +2602,4 @@ const ObjectLoader = (function () {
|
|||
return ObjectLoader;
|
||||
})();
|
||||
|
||||
export { Catalog, ObjectLoader, XRef, FileSpec };
|
||||
export { Catalog, FileSpec, ObjectLoader, XRef };
|
||||
|
|
|
@ -994,4 +994,4 @@ function getTilingPatternIR(operatorList, dict, color) {
|
|||
];
|
||||
}
|
||||
|
||||
export { Pattern, getTilingPatternIR };
|
||||
export { getTilingPatternIR, Pattern };
|
||||
|
|
|
@ -394,19 +394,19 @@ function clearPrimitiveCaches() {
|
|||
}
|
||||
|
||||
export {
|
||||
EOF,
|
||||
clearPrimitiveCaches,
|
||||
Cmd,
|
||||
Dict,
|
||||
Name,
|
||||
Ref,
|
||||
RefSet,
|
||||
RefSetCache,
|
||||
isEOF,
|
||||
EOF,
|
||||
isCmd,
|
||||
isDict,
|
||||
isEOF,
|
||||
isName,
|
||||
isRef,
|
||||
isRefsEqual,
|
||||
isStream,
|
||||
Name,
|
||||
Ref,
|
||||
RefSet,
|
||||
RefSetCache,
|
||||
};
|
||||
|
|
|
@ -764,11 +764,11 @@ const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) {
|
|||
});
|
||||
|
||||
export {
|
||||
getStdFontMap,
|
||||
getGlyphMapForStandardFonts,
|
||||
getNonStdFontMap,
|
||||
getSerifFonts,
|
||||
getSymbolsFonts,
|
||||
getGlyphMapForStandardFonts,
|
||||
getStdFontMap,
|
||||
getSupplementalGlyphMapForArialBlack,
|
||||
getSupplementalGlyphMapForCalibri,
|
||||
getSymbolsFonts,
|
||||
};
|
||||
|
|
|
@ -1341,14 +1341,14 @@ var NullStream = (function NullStreamClosure() {
|
|||
export {
|
||||
Ascii85Stream,
|
||||
AsciiHexStream,
|
||||
DecryptStream,
|
||||
DecodeStream,
|
||||
DecryptStream,
|
||||
FlateStream,
|
||||
LZWStream,
|
||||
NullStream,
|
||||
PredictorStream,
|
||||
RunLengthStream,
|
||||
Stream,
|
||||
StreamsSequenceStream,
|
||||
StringStream,
|
||||
LZWStream,
|
||||
};
|
||||
|
|
|
@ -1642,9 +1642,9 @@ function reverseIfRtl(chars) {
|
|||
}
|
||||
|
||||
export {
|
||||
mapSpecialUnicodeValues,
|
||||
reverseIfRtl,
|
||||
getUnicodeRangeFor,
|
||||
getNormalizedUnicodes,
|
||||
getUnicodeForGlyph,
|
||||
getUnicodeRangeFor,
|
||||
mapSpecialUnicodeValues,
|
||||
reverseIfRtl,
|
||||
};
|
||||
|
|
|
@ -804,4 +804,4 @@ if (
|
|||
WorkerMessageHandler.initializeFromPort(self);
|
||||
}
|
||||
|
||||
export { WorkerTask, WorkerMessageHandler };
|
||||
export { WorkerMessageHandler, WorkerTask };
|
||||
|
|
|
@ -273,4 +273,4 @@ function incrementalUpdate({
|
|||
return array;
|
||||
}
|
||||
|
||||
export { writeDict, incrementalUpdate };
|
||||
export { incrementalUpdate, writeDict };
|
||||
|
|
|
@ -3051,15 +3051,15 @@ const build =
|
|||
typeof PDFJSDev !== "undefined" ? PDFJSDev.eval("BUNDLE_BUILD") : null;
|
||||
|
||||
export {
|
||||
getDocument,
|
||||
LoopbackPort,
|
||||
PDFDataRangeTransport,
|
||||
PDFWorker,
|
||||
PDFDocumentProxy,
|
||||
PDFPageProxy,
|
||||
setPDFNetworkStreamFactory,
|
||||
version,
|
||||
build,
|
||||
DefaultCanvasFactory,
|
||||
DefaultCMapReaderFactory,
|
||||
getDocument,
|
||||
LoopbackPort,
|
||||
PDFDataRangeTransport,
|
||||
PDFDocumentProxy,
|
||||
PDFPageProxy,
|
||||
PDFWorker,
|
||||
setPDFNetworkStreamFactory,
|
||||
version,
|
||||
};
|
||||
|
|
|
@ -642,21 +642,21 @@ class PDFDateString {
|
|||
}
|
||||
|
||||
export {
|
||||
PageViewport,
|
||||
RenderingCancelledException,
|
||||
addLinkAttributes,
|
||||
getFilenameFromUrl,
|
||||
LinkTarget,
|
||||
DEFAULT_LINK_REL,
|
||||
BaseCanvasFactory,
|
||||
DOMCanvasFactory,
|
||||
BaseCMapReaderFactory,
|
||||
DEFAULT_LINK_REL,
|
||||
deprecated,
|
||||
DOMCanvasFactory,
|
||||
DOMCMapReaderFactory,
|
||||
DOMSVGFactory,
|
||||
StatTimer,
|
||||
getFilenameFromUrl,
|
||||
isFetchSupported,
|
||||
isValidFetchUrl,
|
||||
LinkTarget,
|
||||
loadScript,
|
||||
deprecated,
|
||||
PageViewport,
|
||||
PDFDateString,
|
||||
RenderingCancelledException,
|
||||
StatTimer,
|
||||
};
|
||||
|
|
|
@ -166,4 +166,4 @@ class IPDFStreamRangeReader {
|
|||
cancel(reason) {}
|
||||
}
|
||||
|
||||
export { IPDFStream, IPDFStreamReader, IPDFStreamRangeReader };
|
||||
export { IPDFStream, IPDFStreamRangeReader, IPDFStreamReader };
|
||||
|
|
|
@ -37,4 +37,4 @@ const pdfjsVersion = PDFJSDev.eval("BUNDLE_VERSION");
|
|||
// eslint-disable-next-line no-unused-vars
|
||||
const pdfjsBuild = PDFJSDev.eval("BUNDLE_BUILD");
|
||||
|
||||
export { Jbig2mage, JpegImage, JpxImage, getVerbosityLevel, setVerbosityLevel };
|
||||
export { getVerbosityLevel, Jbig2mage, JpegImage, JpxImage, setVerbosityLevel };
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint-disable sort-exports/sort-exports */
|
||||
|
||||
import {
|
||||
addLinkAttributes,
|
||||
|
|
|
@ -1015,12 +1015,7 @@ function encodeToXmlString(str) {
|
|||
}
|
||||
|
||||
export {
|
||||
BaseException,
|
||||
FONT_IDENTITY_MATRIX,
|
||||
IDENTITY_MATRIX,
|
||||
OPS,
|
||||
VerbosityLevel,
|
||||
UNSUPPORTED_FEATURES,
|
||||
AbortException,
|
||||
AnnotationActionEventType,
|
||||
AnnotationBorderStyleType,
|
||||
AnnotationFieldFlag,
|
||||
|
@ -1030,55 +1025,60 @@ export {
|
|||
AnnotationReviewState,
|
||||
AnnotationStateModelType,
|
||||
AnnotationType,
|
||||
FontType,
|
||||
ImageKind,
|
||||
arrayByteLength,
|
||||
arraysToBytes,
|
||||
assert,
|
||||
BaseException,
|
||||
bytesToString,
|
||||
CMapCompressionType,
|
||||
createObjectURL,
|
||||
createPromiseCapability,
|
||||
createValidAbsoluteUrl,
|
||||
DocumentActionEventType,
|
||||
AbortException,
|
||||
encodeToXmlString,
|
||||
escapeString,
|
||||
FONT_IDENTITY_MATRIX,
|
||||
FontType,
|
||||
FormatError,
|
||||
getModificationDate,
|
||||
getVerbosityLevel,
|
||||
IDENTITY_MATRIX,
|
||||
ImageKind,
|
||||
info,
|
||||
InvalidPDFException,
|
||||
isArrayBuffer,
|
||||
isArrayEqual,
|
||||
isAscii,
|
||||
isBool,
|
||||
IsEvalSupportedCached,
|
||||
IsLittleEndianCached,
|
||||
isNum,
|
||||
isSameOrigin,
|
||||
isString,
|
||||
MissingPDFException,
|
||||
objectFromEntries,
|
||||
objectSize,
|
||||
OPS,
|
||||
PageActionEventType,
|
||||
PasswordException,
|
||||
PasswordResponses,
|
||||
PermissionFlag,
|
||||
StreamType,
|
||||
TextRenderingMode,
|
||||
UnexpectedResponseException,
|
||||
UnknownErrorException,
|
||||
Util,
|
||||
FormatError,
|
||||
arrayByteLength,
|
||||
arraysToBytes,
|
||||
assert,
|
||||
bytesToString,
|
||||
createPromiseCapability,
|
||||
createObjectURL,
|
||||
escapeString,
|
||||
encodeToXmlString,
|
||||
getModificationDate,
|
||||
getVerbosityLevel,
|
||||
info,
|
||||
isAscii,
|
||||
isArrayBuffer,
|
||||
isArrayEqual,
|
||||
isBool,
|
||||
isNum,
|
||||
isString,
|
||||
isSameOrigin,
|
||||
createValidAbsoluteUrl,
|
||||
objectSize,
|
||||
objectFromEntries,
|
||||
IsLittleEndianCached,
|
||||
IsEvalSupportedCached,
|
||||
removeNullCharacters,
|
||||
setVerbosityLevel,
|
||||
shadow,
|
||||
StreamType,
|
||||
string32,
|
||||
stringToBytes,
|
||||
stringToPDFString,
|
||||
stringToUTF16BEString,
|
||||
stringToUTF8String,
|
||||
utf8StringToString,
|
||||
warn,
|
||||
TextRenderingMode,
|
||||
UnexpectedResponseException,
|
||||
UnknownErrorException,
|
||||
unreachable,
|
||||
UNSUPPORTED_FEATURES,
|
||||
utf8StringToString,
|
||||
Util,
|
||||
VerbosityLevel,
|
||||
warn,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue