Merge pull request #11505 from Snuffleupagus/eslint-no-unneeded-ternary

Enable the ESLint `no-unneeded-ternary` rule
This commit is contained in:
Tim van der Meij 2020-01-12 19:28:11 +01:00 committed by GitHub
commit ba1d8d8728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -138,6 +138,7 @@
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 1, }],
"no-nested-ternary": "off",
"no-new-object": "error",
"no-unneeded-ternary": "error",
"spaced-comment": ["error", "always", {
"block": {
"balanced": true,

View File

@ -768,7 +768,7 @@ class BaseViewer {
height = 0,
widthScale,
heightScale;
const changeOrientation = pageView.rotation % 180 === 0 ? false : true;
const changeOrientation = pageView.rotation % 180 !== 0;
const pageWidth =
(changeOrientation ? pageView.height : pageView.width) /
pageView.scale /