Skip to content

Commit f4caec1

Browse files
committed
fix some eslint errors found with latest eslint version
1 parent 4932d9f commit f4caec1

File tree

6 files changed

+17
-10
lines changed

6 files changed

+17
-10
lines changed

src/components/Main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import React from 'react';
2-
3-
THREE.ImageUtils.crossOrigin = '';
4-
52
import Events from '../lib/Events';
63
import ComponentsSidebar from './components/Sidebar';
74
import ModalTextures from './modals/ModalTextures';
@@ -12,6 +9,8 @@ import TransformToolbar from './viewport/TransformToolbar';
129
import ViewportHUD from './viewport/ViewportHUD';
1310
import { injectCSS } from '../lib/utils';
1411

12+
THREE.ImageUtils.crossOrigin = '';
13+
1514
// Megahack to include font-awesome.
1615
injectCSS('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');
1716

@@ -89,6 +88,7 @@ export default class Main extends React.Component {
8988
this.setState({ isHelpOpen: true });
9089
});
9190
}
91+
9292
onCloseHelpModal = value => {
9393
this.setState({ isHelpOpen: false });
9494
};

src/components/components/PropertyRow.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@ import { updateEntity } from '../../lib/entity';
1919
export default class PropertyRow extends React.Component {
2020
static propTypes = {
2121
componentname: PropTypes.string.isRequired,
22+
data: PropTypes.oneOfType([
23+
PropTypes.bool.isRequired,
24+
PropTypes.number.isRequired,
25+
PropTypes.object.isRequired,
26+
PropTypes.string.isRequired
27+
]),
2228
entity: PropTypes.object.isRequired,
2329
id: PropTypes.string,
30+
isSingle: PropTypes.bool.isRequired,
2431
name: PropTypes.string.isRequired,
2532
schema: PropTypes.object.isRequired
2633
};

src/components/modals/ModalTextures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class ModalTextures extends React.Component {
122122
var self = this;
123123
Array.prototype.slice
124124
.call(document.querySelectorAll('a-assets img'))
125-
.map(asset => {
125+
.forEach(asset => {
126126
var image = new Image();
127127
image.addEventListener('load', () => {
128128
self.state.assetsImages.push({

src/lib/TransformControls.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable curly */
1+
/* eslint-disable curly, dot-notation */
22
/**
33
* @author arodic / https://github.com/arodic
44
*/
@@ -1174,9 +1174,9 @@
11741174
scope.object.quaternion.copy(tempQuaternion);
11751175
} else if (scope.axis === 'XYZE') {
11761176
var p = point
1177-
.clone()
1178-
.cross(tempVector)
1179-
.normalize();
1177+
.clone()
1178+
.cross(tempVector)
1179+
.normalize();
11801180
quaternionE.setFromEuler(tempEuler.set(p.x, p.y, p.z)); // rotation axis
11811181

11821182
tempQuaternion.setFromRotationMatrix(

src/lib/assetsLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AssetsLoader.prototype = {
1717
*/
1818
load: function() {
1919
var xhr = new XMLHttpRequest();
20-
var url = assetsBaseUrl + assetsRelativeUrl['images'];
20+
var url = assetsBaseUrl + assetsRelativeUrl.images;
2121

2222
// @todo Remove the sync call and use a callback
2323
xhr.open('GET', url);

src/lib/viewport.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function Viewport(inspector) {
9696
sceneHelpers.add(transformControls);
9797

9898
Events.on('entityupdate', detail => {
99-
if (inspector.selectedEntity.object3DMap['mesh']) {
99+
if (inspector.selectedEntity.object3DMap.mesh) {
100100
selectionBox.setFromObject(inspector.selected);
101101
}
102102
});

0 commit comments

Comments
 (0)