Skip to content

Commit

Permalink
mysql - upgrading xo to 0.54.1 and fixes on unicorn/prefer-ternary (#777
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jaredwray authored Apr 15, 2023
1 parent ce12c80 commit 10225d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"ts-node": "^10.9.1",
"tsd": "^0.28.0",
"typescript": "^5.0.2",
"xo": "^0.53.1"
"xo": "^0.54.1"
},
"tsd": {
"directory": "test"
Expand Down
8 changes: 1 addition & 7 deletions packages/mysql/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,7 @@ class KeyvMysql extends EventEmitter {
let i = 0;
for (const key of keys) {
const rowIndex = rows.findIndex(row => row.id === key);

if (rowIndex > -1) {
results[i] = rows[rowIndex].value;
} else {
results[i] = undefined;
}

results[i] = rowIndex > -1 ? rows[rowIndex].value : undefined;
i++;
}

Expand Down
9 changes: 1 addition & 8 deletions packages/sqlite/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable unicorn/prefer-ternary */
'use strict';

const EventEmitter = require('events');
Expand Down Expand Up @@ -67,13 +66,7 @@ class KeyvSqlite extends EventEmitter {
let i = 0;
for (const key of keys) {
const rowIndex = rows.findIndex(row => row.key === key);

if (rowIndex > -1) {
results[i] = rows[rowIndex].value;
} else {
results[i] = undefined;
}

results[i] = rowIndex > -1 ? rows[rowIndex].value : undefined;
i++;
}

Expand Down

0 comments on commit 10225d8

Please sign in to comment.