Skip to content

Commit

Permalink
Mark unused var
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 22, 2024
1 parent f8884ea commit 0f8ad8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion javascript/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"rules": {
"max-len": ["error", {"code": 120}],
"indent": ["error", 4]
"indent": ["error", 4],
"no-unused-vars": ["error", { "varsIgnorePattern": "^_" }]
}
}
5 changes: 3 additions & 2 deletions javascript/src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ exports.get_data_file = function(name, encoding = 'utf8') {
* @return {number | string}
*/
exports.get_answer = function(n) {
const strN = String(n);
for (const line of exports.get_data_file('answers.tsv').split(new RegExp('\\r?\\n'))) {
const [id_, type, size, value] = line.split('\t');
if (id_ !== n.toString()) {
const [id_, type, _, value] = line.split('\t');
if (id_ !== strN) {
continue;
}
if (type === 'str') {
Expand Down

0 comments on commit 0f8ad8d

Please # to comment.