Merge pull request #11505 from Snuffleupagus/eslint-no-unneeded-ternary
Enable the ESLint `no-unneeded-ternary` rule
This commit is contained in:
commit
ba1d8d8728
@ -138,6 +138,7 @@
|
|||||||
"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-nested-ternary": "off",
|
||||||
"no-new-object": "error",
|
"no-new-object": "error",
|
||||||
|
"no-unneeded-ternary": "error",
|
||||||
"spaced-comment": ["error", "always", {
|
"spaced-comment": ["error", "always", {
|
||||||
"block": {
|
"block": {
|
||||||
"balanced": true,
|
"balanced": true,
|
||||||
|
@ -768,7 +768,7 @@ class BaseViewer {
|
|||||||
height = 0,
|
height = 0,
|
||||||
widthScale,
|
widthScale,
|
||||||
heightScale;
|
heightScale;
|
||||||
const changeOrientation = pageView.rotation % 180 === 0 ? false : true;
|
const changeOrientation = pageView.rotation % 180 !== 0;
|
||||||
const pageWidth =
|
const pageWidth =
|
||||||
(changeOrientation ? pageView.height : pageView.width) /
|
(changeOrientation ? pageView.height : pageView.width) /
|
||||||
pageView.scale /
|
pageView.scale /
|
||||||
|
Loading…
x
Reference in New Issue
Block a user