Merge pull request #11488 from Snuffleupagus/web-no-nested-ternary
Enable the `no-nested-ternary` ESLint rule in the `web/` directory
This commit is contained in:
commit
4729fdc0e9
@ -136,6 +136,7 @@
|
|||||||
"new-cap": ["error", { "newIsCap": true, "capIsNew": false, }],
|
"new-cap": ["error", { "newIsCap": true, "capIsNew": false, }],
|
||||||
"no-array-constructor": "error",
|
"no-array-constructor": "error",
|
||||||
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 1, }],
|
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 1, }],
|
||||||
|
"no-nested-ternary": "off",
|
||||||
"no-new-object": "error",
|
"no-new-object": "error",
|
||||||
"spaced-comment": ["error", "always", {
|
"spaced-comment": ["error", "always", {
|
||||||
"block": {
|
"block": {
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
// Plugins
|
// Plugins
|
||||||
"import/no-unresolved": ["error", { "ignore": ["pdfjs-lib"]}],
|
"import/no-unresolved": ["error", { "ignore": ["pdfjs-lib"]}],
|
||||||
|
|
||||||
|
// Stylistic Issues
|
||||||
|
"no-nested-ternary": "error",
|
||||||
|
|
||||||
// ECMAScript 6
|
// ECMAScript 6
|
||||||
"no-var": "error",
|
"no-var": "error",
|
||||||
"prefer-const": "error",
|
"prefer-const": "error",
|
||||||
|
24
web/app.js
24
web/app.js
@ -1375,11 +1375,10 @@ const PDFViewerApplication = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const formType = !info.IsAcroFormPresent
|
let formType = null;
|
||||||
? null
|
if (info.IsAcroFormPresent) {
|
||||||
: info.IsXFAPresent
|
formType = info.IsXFAPresent ? "xfa" : "acroform";
|
||||||
? "xfa"
|
}
|
||||||
: "acroform";
|
|
||||||
this.externalServices.reportTelemetry({
|
this.externalServices.reportTelemetry({
|
||||||
type: "documentInfo",
|
type: "documentInfo",
|
||||||
version: versionId,
|
version: versionId,
|
||||||
@ -2066,13 +2065,14 @@ function webViewerNamedAction(evt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function webViewerPresentationModeChanged(evt) {
|
function webViewerPresentationModeChanged({ active, switchInProgress }) {
|
||||||
const { active, switchInProgress } = evt;
|
let state = PresentationModeState.NORMAL;
|
||||||
PDFViewerApplication.pdfViewer.presentationModeState = switchInProgress
|
if (switchInProgress) {
|
||||||
? PresentationModeState.CHANGING
|
state = PresentationModeState.CHANGING;
|
||||||
: active
|
} else if (active) {
|
||||||
? PresentationModeState.FULLSCREEN
|
state = PresentationModeState.FULLSCREEN;
|
||||||
: PresentationModeState.NORMAL;
|
}
|
||||||
|
PDFViewerApplication.pdfViewer.presentationModeState = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
function webViewerSidebarViewChanged(evt) {
|
function webViewerSidebarViewChanged(evt) {
|
||||||
|
Loading…
Reference in New Issue
Block a user