Skip to content

Commit

Permalink
linter warnings fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarkh committed Sep 8, 2020
1 parent 50c1da7 commit 4b583e1
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/ComponentManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ class ComponentManager {
items.forEach( item => this.components.set( item[0], item[1] ) );
}

};
}

export { ComponentManager };
2 changes: 1 addition & 1 deletion src/EasyECS.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ class EasyECS {
return this.entityManager.deserialize( json );
}

};
}

export { EasyECS };
6 changes: 3 additions & 3 deletions src/EntityManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class EntityManager {

has( id ) {
if (!id) { return false; }
return this.entities.has( id )
return this.entities.has( id );
}

get( id ) {
Expand Down Expand Up @@ -160,7 +160,7 @@ class EntityManager {
return;
}
if ( !component_name ) {
LOG.ERROR( 'EntityManager::_updateEntity - entity has no component "' + component_name + '"' )
LOG.ERROR( 'EntityManager::_updateEntity - entity has no component "' + component_name + '"' );
return;
}
if ( !this.componentManager.has( component_name ) ) {
Expand Down Expand Up @@ -203,6 +203,6 @@ class EntityManager {

}

};
}

export { EntityManager };
18 changes: 9 additions & 9 deletions src/Log.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Log {
let log_id = LEVEL, color_id = this.COLORS[log_id];
this[LEVEL] = function( ...args ) {
console.log( '%c'+ log_id + ' | ', 'color: ' + color_id, ...args );
}
};
} else {
this[LEVEL] = function(){};
}
Expand All @@ -39,49 +39,49 @@ class Log {
if ( TRACE3 ) {
this.TRACE3 = function( ...args ) {
console.log( '%cTRACE | ', 'color: gray', ...args );
}
};
}

if ( TRACE2 ) {
this.TRACE2 = function( ...args ) {
console.log( '%cTRACE | ', 'color: gray', ...args );
}
};
}

if ( TRACE ) {
this.TRACE = function( ...args ) {
console.log( '%cTRACE | ', 'color: gray', ...args );
}
};
}

if ( DEBUG ) {
this.DEBUG = function( ...args ) {
console.log( '%cDEBUG | ', 'color: blue', ...args );
}
};
}

if ( INFO ) {
this.INFO = function( ...args ) {
console.log( '%c INFO | ', 'color: green', ...args );
}
};
}

if ( WARN ) {
this.WARN = function( ...args ) {
console.log( '%c WARN | ', 'color: brown', ...args );
}
};
}

if ( ERROR ) {
this.ERROR = function( ...args ) {
console.log( '%cERROR | ', 'color: red', ...args );
}
};
}

if ( FATAL ) {
this.FATAL = function( ...args ) {
console.log( '%cFATAL | ', 'color: purple', ...args );
}
};
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/Query.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ class Query {
}


};
}

export { Query };
2 changes: 1 addition & 1 deletion src/QueryManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ class QueryManager {
}
}

};
}

export { QueryManager };
2 changes: 1 addition & 1 deletion src/Queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ class Queue {
return Array.from( this.items.values() )[ this.size - 1 ];
}

};
}

export { Queue };
2 changes: 1 addition & 1 deletion src/System.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ class System {
if ( this._cb_deinit ) { this._cb_deinit(); }
}

};
}

export { System };
2 changes: 1 addition & 1 deletion src/SystemManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ class SystemManager {
return this.whiteboard[name];
}

};
}

export { SystemManager };
4 changes: 2 additions & 2 deletions src/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function merge_objects( target = Object.create( null, {} ), ...objects ) {
});
return prev;
}, target );
};
}

function merge_objects_incdec( target = Object.create( null, {} ), ...objects ) {
const is_object = obj => ( obj && typeof obj === 'object' && !Array.isArray(obj) );
Expand All @@ -32,7 +32,7 @@ function merge_objects_incdec( target = Object.create( null, {} ), ...objects )
});
return prev;
}, target );
};
}

function make_grid( x, y, v = 0 ) {
return Array.from( Array( x ), () => Array( y ).fill( v ));
Expand Down

0 comments on commit 4b583e1

Please sign in to comment.