Skip to content

Commit bf1a04b

Browse files
author
t-kazu
committed
eslintと優先順位の修正を行いました
1 parent 2967fcd commit bf1a04b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/lib/ruby-generator/data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ export default function (Blockly) {
7070
Blockly.Ruby.data_itemoflist = function (block) {
7171
const index = Blockly.Ruby.valueToCode(block, 'INDEX', Blockly.Ruby.ORDER_INDEX) - 1 || 0;
7272
const list = Blockly.Ruby.listName(block.getFieldValue('LIST'));
73-
return `${list}[${index}]\n`;
73+
return [`${list}[${index}]`, Blockly.Ruby.ORDER_FUNCTION_CAL];
7474
};
7575

7676
Blockly.Ruby.data_itemnumoflist = function (block) {
7777
const item = Blockly.Ruby.valueToCode(block, 'ITEM', Blockly.Ruby.ORDER_NONE) || '0';
7878
const list = Blockly.Ruby.listName(block.getFieldValue('LIST'));
79-
return `${list}.index(${item})`;
79+
return [`${list}.index(${item})`, Blockly.Ruby.ORDER_FUNCTION_CAL];
8080
};
8181

8282
Blockly.Ruby.data_lengthoflist = function (block) {

src/lib/ruby-generator/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,15 @@ export default function (Blockly) {
346346
};
347347

348348
Blockly.Ruby.variableName = function (name) {
349-
let variable = this.editingTarget.lookupOrCreateVariable(name);
349+
const variable = this.editingTarget.lookupOrCreateVariable(name);
350350
if (variable) {
351351
return variable.name;
352352
}
353353
return null;
354354
};
355355

356356
Blockly.Ruby.listName = function (name) {
357-
let list = this.editingTarget.lookupOrCreateList(name);
357+
const list = this.editingTarget.lookupOrCreateList(name);
358358
if (list) {
359359
return list.name;
360360
}

0 commit comments

Comments
 (0)