1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

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

@ -2475,6 +2475,6 @@ export {
Annotation,
AnnotationBorderStyle,
AnnotationFactory,
MarkupAnnotation,
getQuadPoints,
MarkupAnnotation,
};

View file

@ -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,
};

View file

@ -116,4 +116,4 @@ const ExpertSubsetCharset = [
"periodinferior", "commainferior"
];
export { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset };
export { ExpertCharset, ExpertSubsetCharset, ISOAdobeCharset };

View file

@ -1055,4 +1055,4 @@ var CMapFactory = (function CMapFactoryClosure() {
};
})();
export { CMap, IdentityCMap, CMapFactory };
export { CMap, CMapFactory, IdentityCMap };

View file

@ -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,
};

View file

@ -1956,11 +1956,11 @@ export {
AES128Cipher,
AES256Cipher,
ARCFourCipher,
CipherTransformFactory,
PDF17,
PDF20,
calculateMD5,
calculateSHA256,
calculateSHA384,
calculateSHA512,
CipherTransformFactory,
PDF17,
PDF20,
};

View file

@ -291,11 +291,11 @@ function getEncoding(encodingName) {
}
export {
WinAnsiEncoding,
StandardEncoding,
MacRomanEncoding,
SymbolSetEncoding,
ZapfDingbatsEncoding,
ExpertEncoding,
getEncoding,
MacRomanEncoding,
StandardEncoding,
SymbolSetEncoding,
WinAnsiEncoding,
ZapfDingbatsEncoding,
};

View file

@ -4013,11 +4013,11 @@ var CFFFont = (function CFFFontClosure() {
})();
export {
SEAC_ANALYSIS_ENABLED,
ErrorFont,
Font,
FontFlags,
ToUnicodeMap,
IdentityToUnicodeMap,
getFontType,
IdentityToUnicodeMap,
SEAC_ANALYSIS_ENABLED,
ToUnicodeMap,
};

View file

@ -1345,6 +1345,6 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
export {
isPDFFunction,
PDFFunctionFactory,
PostScriptEvaluator,
PostScriptCompiler,
PostScriptEvaluator,
};

View file

@ -4556,4 +4556,4 @@ var getDingbatsGlyphsUnicode = getArrayLookupTableFactory(function () {
];
});
export { getGlyphsUnicode, getDingbatsGlyphsUnicode };
export { getDingbatsGlyphsUnicode, getGlyphsUnicode };

View file

@ -250,10 +250,10 @@ class GlobalImageCache {
}
export {
LocalImageCache,
GlobalImageCache,
LocalColorSpaceCache,
LocalFunctionCache,
LocalGStateCache,
LocalImageCache,
LocalTilingPatternCache,
GlobalImageCache,
};

View file

@ -2602,4 +2602,4 @@ const ObjectLoader = (function () {
return ObjectLoader;
})();
export { Catalog, ObjectLoader, XRef, FileSpec };
export { Catalog, FileSpec, ObjectLoader, XRef };

View file

@ -994,4 +994,4 @@ function getTilingPatternIR(operatorList, dict, color) {
];
}
export { Pattern, getTilingPatternIR };
export { getTilingPatternIR, Pattern };

View file

@ -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,
};

View file

@ -764,11 +764,11 @@ const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) {
});
export {
getStdFontMap,
getGlyphMapForStandardFonts,
getNonStdFontMap,
getSerifFonts,
getSymbolsFonts,
getGlyphMapForStandardFonts,
getStdFontMap,
getSupplementalGlyphMapForArialBlack,
getSupplementalGlyphMapForCalibri,
getSymbolsFonts,
};

View file

@ -1341,14 +1341,14 @@ var NullStream = (function NullStreamClosure() {
export {
Ascii85Stream,
AsciiHexStream,
DecryptStream,
DecodeStream,
DecryptStream,
FlateStream,
LZWStream,
NullStream,
PredictorStream,
RunLengthStream,
Stream,
StreamsSequenceStream,
StringStream,
LZWStream,
};

View file

@ -1642,9 +1642,9 @@ function reverseIfRtl(chars) {
}
export {
mapSpecialUnicodeValues,
reverseIfRtl,
getUnicodeRangeFor,
getNormalizedUnicodes,
getUnicodeForGlyph,
getUnicodeRangeFor,
mapSpecialUnicodeValues,
reverseIfRtl,
};

View file

@ -804,4 +804,4 @@ if (
WorkerMessageHandler.initializeFromPort(self);
}
export { WorkerTask, WorkerMessageHandler };
export { WorkerMessageHandler, WorkerTask };

View file

@ -273,4 +273,4 @@ function incrementalUpdate({
return array;
}
export { writeDict, incrementalUpdate };
export { incrementalUpdate, writeDict };