Skip to content

Commit 7d50bcb

Browse files
editor/code: Enable ESLint for editors/code/webview/view_memory_layout.ts
1 parent d125805 commit 7d50bcb

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

editors/code/src/webview/view_memory_layout.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ export function showMemoryLayout(data): void {
4646
container.appendChild(table);
4747
const rows = [];
4848

49-
// eslint-disable-next-line camelcase
50-
function node_t(idx, depth, offset) {
49+
function nodeT(idx, depth, offset) {
5150
if (!rows[depth]) {
5251
rows[depth] = { el: document.createElement("tr"), offset: 0 };
5352
}
@@ -92,25 +91,23 @@ export function showMemoryLayout(data): void {
9291
tooltip.style.display = "block";
9392
});
9493
td.addEventListener("mouseleave", (_) => (tooltip.style.display = "none"));
95-
// eslint-disable-next-line camelcase
96-
const total_offset = rows[depth].offset;
94+
95+
const totalOffset = rows[depth].offset;
9796
td.addEventListener("dblclick", (e) => {
9897
const node = data.nodes[idx];
9998
zoom = data.nodes[0].size / node.size;
100-
// eslint-disable-next-line camelcase
101-
y = (-total_offset / data.nodes[0].size) * zoom;
99+
y = (-totalOffset / data.nodes[0].size) * zoom;
102100
x = 0;
103101
locate();
104102
});
105103

106104
rows[depth].el.appendChild(td);
107105
rows[depth].offset += data.nodes[idx].size;
108106

109-
// eslint-disable-next-line eqeqeq
110-
if (data.nodes[idx].childrenStart != -1) {
107+
if (data.nodes[idx].childrenStart !== -1) {
111108
for (let i = 0; i < data.nodes[idx].childrenLen; i++) {
112109
if (data.nodes[data.nodes[idx].childrenStart + i].size) {
113-
node_t(
110+
nodeT(
114111
data.nodes[idx].childrenStart + i,
115112
depth + 1,
116113
offset + data.nodes[data.nodes[idx].childrenStart + i].offset
@@ -120,7 +117,7 @@ export function showMemoryLayout(data): void {
120117
}
121118
}
122119

123-
node_t(0, 0, 0);
120+
nodeT(0, 0, 0);
124121

125122
for (const row of rows) table.appendChild(row.el);
126123

0 commit comments

Comments
 (0)