Skip to content

Commit 47857b9

Browse files
committed
Review comments: Move to arrow function
1 parent a08dfc6 commit 47857b9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/cli-flags-helper.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ const targetList = new Set([
1818
]);
1919

2020
function getOnlyFlag(argv) {
21-
if (process.argv.indexOf("--only") != -1) {
22-
return process.argv[process.argv.indexOf("--only") + 1];
21+
const onlyIndex = process.argv.indexOf("--only");
22+
if (onlyIndex != -1) {
23+
return process.argv[onlyIndex + 1];
2324
}
2425
}
2526

2627
module.exports = {
27-
getTarget: function() {
28-
let onlyArg = getOnlyFlag();
28+
getTarget: () => {
29+
const onlyArg = getOnlyFlag();
2930
if (targetList.has(onlyArg)) {
3031
return [onlyArg];
3132
} else if (typeof ONLY != "undefined" && targetList.has(ONLY)) {

0 commit comments

Comments
 (0)