Skip to content

Commit dab9eec

Browse files
committed
Cleanup
1 parent ba381c0 commit dab9eec

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
"ecmaVersion": 11,
1010
"sourceType": "module"
1111
},
12-
"rules": {}
12+
"rules": {
13+
"no-param-reassign": "off"
14+
}
1315
}

config/webpack.common.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ module.exports = {
8989
{
9090
test: /\.jsx?$/,
9191
exclude: /node_modules/,
92-
// use: ['babel-loader', 'eslint-loader'],
93-
use: ['babel-loader'],
92+
use: ['babel-loader', 'eslint-loader'],
9493
},
9594

9695
/**

src/js/animatedModel.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class AnimatedModel {
3636
}
3737

3838
deconstruct() {
39-
for (const elem of this.trackingElems) {
40-
elem.remove();
41-
}
39+
this.trackingElems.forEach((elem) => {
40+
elem.remove();
41+
});
4242

4343
this.nametag.remove();
4444
this.chatBubble.remove();
@@ -55,7 +55,7 @@ class AnimatedModel {
5555
htmlElem.style.transitionTimingFunction = 'linear';
5656
htmlElem.style.transitionProperty = 'top, left';
5757

58-
this.trackingElems.push(htmlElem)
58+
this.trackingElems.push(htmlElem);
5959
}
6060

6161
updateChat(msg) {
@@ -102,11 +102,11 @@ class AnimatedModel {
102102
const objPt = dest.clone();
103103
const screenPt = this.reverseRaycaster(objPt);
104104

105-
for (const elem of this.trackingElems) {
106-
elem.style.transitionDuration = `${time}s`;
107-
elem.style.left = `${screenPt[0]}px`;
108-
elem.style.top = `${screenPt[1]}px`;
109-
}
105+
this.trackingElems.forEach((elem) => {
106+
elem.style.transitionDuration = `${time}s`;
107+
elem.style.left = `${screenPt[0]}px`;
108+
elem.style.top = `${screenPt[1]}px`;
109+
});
110110

111111
return time;
112112
}

0 commit comments

Comments
 (0)