Merge pull request #5518 from overleaf/jpa-no-empty

[misc] fix eslint violations for no-empty

GitOrigin-RevId: 8fc1688ac28ccf29b830ba43cd6091e64b5e3b07
This commit is contained in:
Jakob Ackermann 2021-10-26 10:09:23 +02:00 committed by Copybot
parent 4cefebec5d
commit 5862359ff0
14 changed files with 12 additions and 14 deletions

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -77,7 +77,9 @@ const checkOp = function (op) {
exports._makeAppend = makeAppend = op =>
function (component) {
if (component === 0 || component.i === '' || component.d === '') {
} else if (op.length === 0) {
return
}
if (op.length === 0) {
return op.push(component)
} else if (
typeof component === 'number' &&

View file

@ -216,7 +216,9 @@ type._append = append = function (op, component) {
component.i === 0 ||
component.d === 0
) {
} else if (op.length === 0) {
return
}
if (op.length === 0) {
return op.push(component)
} else {
const last = op[op.length - 1]

View file

@ -78,7 +78,9 @@ const checkOp = function (op) {
moduleExport._makeAppend = makeAppend = op =>
function (component) {
if (component === 0 || component.i === '' || component.d === '') {
} else if (op.length === 0) {
return
}
if (op.length === 0) {
return op.push(component)
} else if (
typeof component === 'number' &&

View file

@ -216,7 +216,9 @@ type._append = append = function (op, component) {
component.i === 0 ||
component.d === 0
) {
} else if (op.length === 0) {
return
}
if (op.length === 0) {
return op.push(component)
} else {
const last = op[op.length - 1]

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",

View file

@ -22,7 +22,6 @@
"rules": {
// TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671)
// START of temporary overrides
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
"node/no-callback-literal": "off",