Skip to content

Commit

Permalink
Merge pull request #20141 from DefinitelyMaybe/lint-fix-update
Browse files Browse the repository at this point in the history
Lint fix update
  • Loading branch information
mrdoob committed Aug 21, 2020
2 parents 6170ab8 + cb7aaea commit 8a975bc
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions examples/js/animation/TimelinerController.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ THREE.TimelinerController.prototype = {

var track = this._tracks[ channelName ],
times = track.times,
index = Timeliner.binarySearch( times, time ),
index = Timeliner.binarySearch( times, time ), // eslint-disable-line no-undef
values = track.values,
stride = track.getValueSize(),
offset = index * stride;
Expand Down Expand Up @@ -120,7 +120,7 @@ THREE.TimelinerController.prototype = {

var track = this._tracks[ channelName ],
times = track.times,
index = Timeliner.binarySearch( times, time );
index = Timeliner.binarySearch( times, time ); // eslint-disable-line no-undef

// we disallow to remove the keyframe when it is the last one we have,
// since the animation system is designed to always produce a defined
Expand Down Expand Up @@ -159,7 +159,7 @@ THREE.TimelinerController.prototype = {

var track = this._tracks[ channelName ],
times = track.times,
index = Timeliner.binarySearch( times, time );
index = Timeliner.binarySearch( times, time ); // eslint-disable-line no-undef

if ( index >= 0 ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/js/exporters/MMDExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ THREE.MMDExporter = function () {

if ( u2sTable === undefined ) {

var encoder = new MMDParser.CharsetEncoder();
var encoder = new MMDParser.CharsetEncoder(); // eslint-disable-line no-undef
var table = encoder.s2uTable;
u2sTable = {};

Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/3MFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ THREE.ThreeMFLoader.prototype = Object.assign( Object.create( THREE.Loader.proto

try {

zip = new JSZip( data );
zip = new JSZip( data ); // eslint-disable-line no-undef

} catch ( e ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/AMFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ THREE.AMFLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype

try {

zip = new JSZip( data );
zip = new JSZip( data ); // eslint-disable-line no-undef

} catch ( e ) {

Expand Down
4 changes: 2 additions & 2 deletions examples/js/loaders/AssimpLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@ THREE.AssimpLoader.prototype = Object.assign( Object.create( THREE.Loader.protot
function ReadBounds( stream, T /*p*/, n ) {

// not sure what to do here, the data isn't really useful.
return stream.Seek( sizeof( T ) * n, aiOrigin_CUR );
return stream.Seek( sizeof( T ) * n, aiOrigin_CUR ); // eslint-disable-line no-undef

}

Expand Down Expand Up @@ -2265,7 +2265,7 @@ THREE.AssimpLoader.prototype = Object.assign( Object.create( THREE.Loader.protot
var compressedData = [];
stream.Read( compressedData, 1, compressedSize );
var uncompressedData = [];
uncompress( uncompressedData, uncompressedSize, compressedData, compressedSize );
uncompress( uncompressedData, uncompressedSize, compressedData, compressedSize ); // eslint-disable-line no-undef
var buff = new ArrayBuffer( uncompressedData );
ReadBinaryScene( buff, pScene );

Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/BasisTextureLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ THREE.BasisTextureLoader.BasisWorker = function () {
transcoderPending = new Promise( ( resolve ) => {

BasisModule = { wasmBinary, onRuntimeInitialized: resolve };
BASIS( BasisModule );
BASIS( BasisModule ); // eslint-disable-line no-undef

} ).then( () => {

Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/DRACOLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ THREE.DRACOLoader.DRACOWorker = function () {

};

DracoDecoderModule( decoderConfig );
DracoDecoderModule( decoderConfig ); // eslint-disable-line no-undef

} );
break;
Expand Down
18 changes: 9 additions & 9 deletions examples/js/loaders/EXRLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -938,15 +938,15 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade

for ( let comp = 0; comp < numComp; ++ comp ) {

let type = channelData[ cscSet.idx[ comp ] ].type;
const type = channelData[ cscSet.idx[ comp ] ].type;

for ( let y = 8 * blocky; y < 8 * blocky + maxY; ++ y ) {

offset = rowOffsets[ comp ][ y ];

for ( let blockx = 0; blockx < numFullBlocksX; ++ blockx ) {

let src = blockx * 64 + ( ( y & 0x7 ) * 8 );
const src = blockx * 64 + ( ( y & 0x7 ) * 8 );

dataView.setUint16( offset + 0 * INT16_SIZE * type, rowBlock[ comp ][ src + 0 ], true );
dataView.setUint16( offset + 1 * INT16_SIZE * type, rowBlock[ comp ][ src + 1 ], true );
Expand All @@ -969,8 +969,8 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade

for ( let y = 8 * blocky; y < 8 * blocky + maxY; ++ y ) {

let offset = rowOffsets[ comp ][ y ] + 8 * numFullBlocksX * INT16_SIZE * type;
let src = numFullBlocksX * 64 + ( ( y & 0x7 ) * 8 );
const offset = rowOffsets[ comp ][ y ] + 8 * numFullBlocksX * INT16_SIZE * type;
const src = numFullBlocksX * 64 + ( ( y & 0x7 ) * 8 );

for ( let x = 0; x < maxX; ++ x ) {

Expand Down Expand Up @@ -999,7 +999,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade

for ( var y = 0; y < height; ++ y ) {

let offset = rowOffsets[ comp ][ y ];
const offset = rowOffsets[ comp ][ y ];

for ( var x = 0; x < width; ++ x ) {

Expand Down Expand Up @@ -1416,7 +1416,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade

let tmpBufferEnd = 0;
let writePtr = 0;
let ptr = new Array( 4 );
const ptr = new Array( 4 );

for ( let y = 0; y < info.lines; y ++ ) {

Expand Down Expand Up @@ -1588,7 +1588,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
case DEFLATE:

var compressed = info.array.slice( inOffset.value, inOffset.value + dwaHeader.totalAcUncompressedCount );
var inflate = new Inflate( compressed, { resize: true, verify: true } );
var inflate = new Inflate( compressed, { resize: true, verify: true } ); // eslint-disable-line no-undef
var acBuffer = new Uint16Array( inflate.decompress().buffer );
inOffset.value += dwaHeader.totalAcUncompressedCount;
break;
Expand All @@ -1615,7 +1615,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
if ( dwaHeader.rleRawSize > 0 ) {

var compressed = info.array.slice( inOffset.value, inOffset.value + dwaHeader.rleCompressedSize );
var inflate = new Inflate( compressed, { resize: true, verify: true } );
var inflate = new Inflate( compressed, { resize: true, verify: true } ); // eslint-disable-line no-undef
var rleBuffer = decodeRunLength( inflate.decompress().buffer );

inOffset.value += dwaHeader.rleCompressedSize;
Expand Down Expand Up @@ -2392,7 +2392,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade

}

let format = ( this.type === THREE.UnsignedByteType ) ? THREE.RGBEFormat : ( numChannels === 4 ) ? THREE.RGBAFormat : THREE.RGBFormat;
const format = ( this.type === THREE.UnsignedByteType ) ? THREE.RGBEFormat : ( numChannels === 4 ) ? THREE.RGBAFormat : THREE.RGBFormat;

return {
header: EXRHeader,
Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/KMZLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ THREE.KMZLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype

//

var zip = new JSZip( data );
var zip = new JSZip( data ); // eslint-disable-line no-undef

if ( zip.files[ 'doc.kml' ] ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/MMDLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ THREE.MMDLoader = ( function () {

}

this.parser = new MMDParser.Parser();
this.parser = new MMDParser.Parser(); // eslint-disable-line no-undef

}

Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/TTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ THREE.TTFLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype

}

return convert( opentype.parse( arraybuffer ), this.reversed );
return convert( opentype.parse( arraybuffer ), this.reversed ); // eslint-disable-line no-undef

}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"build-closure": "npm run build && google-closure-compiler --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs utils/build/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js",
"dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c utils/build/rollup.config.js -w -m inline\" \"http-server -c-1 -p 8080\"",
"dev-test": "concurrently --names \"ROLLUP,ROLLUPTEST,HTTP\" -c \"bgBlue.bold,bgRed.bold,bgGreen.bold\" \"rollup -c utils/build/rollup.config.js -w -m inline\" \"npm run dev --prefix test\" \"http-server -p 8080\"",
"lint-fix": "eslint src --ext js --ext ts --fix && eslint examples/jsm --ext js --ext ts --ignore-pattern libs --fix",
"lint-fix": "eslint src --ext js --ext ts --fix && eslint examples/js/ --ext js --ext ts --ignore-pattern libs --fix",
"lint-docs": "eslint docs --ext html",
"lint-examples": "eslint examples/jsm --ext js --ext ts --ignore-pattern libs && tsc -p utils/build/tsconfig-examples.lint.json",
"test-lint": "eslint src --ext js --ext ts && tsc -p utils/build/tsconfig.lint.json",
Expand Down

0 comments on commit 8a975bc

Please sign in to comment.