Skip to content

Commit 1bb77a7

Browse files
authored
fix some of the lint-addons warnings and errors (#26388)
1 parent 0298823 commit 1bb77a7

File tree

10 files changed

+17
-16
lines changed

10 files changed

+17
-16
lines changed

examples/jsm/loaders/FBXLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ class FBXTreeParser {
12701270

12711271
} else {
12721272

1273-
material = new MeshPhongMaterial( {
1273+
material = new MeshPhongMaterial( {
12741274
name: Loader.DEFAULT_MATERIAL_NAME,
12751275
color: 0xcccccc
12761276
} );

examples/jsm/loaders/KTX2Loader.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,14 @@ class KTX2Loader extends Loader {
315315

316316
const texture = mipmaps[ 0 ];
317317
texture.mipmaps = mipmaps.map( dt => {
318+
318319
return {
319320
data: dt.source.data,
320321
width: dt.source.data.width,
321322
height: dt.source.data.height,
322323
depth: dt.source.data.depth
323324
};
325+
324326
} );
325327
return texture;
326328

examples/jsm/loaders/LDrawLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ class LDrawParsedCache {
767767
const text = await fileLoader.loadAsync( subobjectURL );
768768
return text;
769769

770-
} catch {
770+
} catch ( _ ) {
771771

772772
continue;
773773

examples/jsm/loaders/NRRDLoader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,10 @@ class NRRDLoader extends Loader {
473473

474474
volume.inverseMatrix = new Matrix4();
475475
volume.inverseMatrix.copy( volume.matrix ).invert();
476-
476+
477477
volume.RASDimensions = [
478-
Math.floor( volume.xLength * spacingX ),
479-
Math.floor( volume.yLength * spacingY ),
478+
Math.floor( volume.xLength * spacingX ),
479+
Math.floor( volume.yLength * spacingY ),
480480
Math.floor( volume.zLength * spacingZ )
481481
];
482482

examples/jsm/loaders/PLYLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ class PLYLoader extends Loader {
706706
// ascii section using \r\n as line endings
707707
if ( hasCRNL === true ) i ++;
708708

709-
return { headerText: lines.join( '\r' ) + '\r', headerLength: i };
709+
return { headerText: lines.join( '\r' ) + '\r', headerLength: i };
710710

711711
}
712712

examples/jsm/loaders/VRMLLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ class VRMLLoader extends Loader {
960960

961961
// if the appearance field is NULL or unspecified, lighting is off and the unlit object color is (0, 0, 0)
962962

963-
let material = new MeshBasicMaterial( {
963+
let material = new MeshBasicMaterial( {
964964
name: Loader.DEFAULT_MATERIAL_NAME,
965965
color: 0x000000
966966
} );

examples/jsm/misc/Volume.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,20 +340,18 @@ class Volume {
340340

341341
}
342342

343-
344-
let iLength, jLength;
345-
346-
if( ! this.segmentation ) {
343+
if ( ! this.segmentation ) {
347344

348345
firstDirection.applyMatrix4( volume.inverseMatrix ).normalize();
349346
secondDirection.applyMatrix4( volume.inverseMatrix ).normalize();
350347
axisInIJK.applyMatrix4( volume.inverseMatrix ).normalize();
351348

352349
}
350+
353351
firstDirection.arglet = 'i';
354352
secondDirection.arglet = 'j';
355-
iLength = Math.floor( Math.abs( firstDirection.dot( dimensions ) ) );
356-
jLength = Math.floor( Math.abs( secondDirection.dot( dimensions ) ) );
353+
const iLength = Math.floor( Math.abs( firstDirection.dot( dimensions ) ) );
354+
const jLength = Math.floor( Math.abs( secondDirection.dot( dimensions ) ) );
357355
const planeWidth = Math.abs( iLength * firstSpacing );
358356
const planeHeight = Math.abs( jLength * secondSpacing );
359357

examples/jsm/nodes/geometry/RangeNode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class RangeNode extends Node {
4444

4545
if ( object.isInstancedMesh === true ) {
4646

47-
let minValue = this.minNode.value;
48-
let maxValue = this.maxNode.value;
47+
const minValue = this.minNode.value;
48+
const maxValue = this.maxNode.value;
4949

5050
const minLength = builder.getTypeLength( getValueType( minValue ) );
5151
const maxLength = builder.getTypeLength( getValueType( maxValue ) );

examples/jsm/nodes/shadernode/ShaderNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ const safeGetNodeType = ( node ) => {
261261

262262
return node.getNodeType();
263263

264-
} catch {
264+
} catch ( _ ) {
265265

266266
return undefined;
267267

examples/jsm/renderers/webgpu/utils/WebGPUAttributeUtils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class WebGPUAttributeUtils {
5757
buffer.unmap();
5858

5959
bufferData.buffer = buffer;
60+
6061
}
6162

6263
}

0 commit comments

Comments
 (0)