Fix linting

This commit is contained in:
schmelczerandras 2020-11-17 10:13:31 +01:00
parent e5e928d99a
commit e6376ad059
23 changed files with 33 additions and 58 deletions

View file

@ -1,4 +1,3 @@
import { vec2 } from 'gl-matrix';
import { Renderer } from 'sdf-2d';
import { Command } from 'shared';

View file

@ -11,7 +11,6 @@ import {
deserialize,
TransportEvents,
SetAspectRatioActionCommand,
PlayerInformation,
UpdateOtherPlayerDirections,
clamp,
UpdateGameState,
@ -193,7 +192,7 @@ export class Game extends CommandReceiver {
}px) translateX(-50%) translateY(-50%) rotate(${-angle + Math.PI / 2}rad) `;
});
for (let id in this.arrows) {
for (const id in this.arrows) {
if (
Object.prototype.hasOwnProperty.call(this.arrows, id) &&
command.otherPlayerDirections.find((v) => v.id?.toString() === id) === undefined

View file

@ -1,4 +1,3 @@
import { vec2 } from 'gl-matrix';
import { Circle } from 'shared';
import { LinearExtrapolator } from './linear-extrapolator';
import { Vec2Extrapolator } from './vec2-extrapolator';

View file

@ -1,5 +1,3 @@
import { clamp } from 'shared';
export class LinearExtrapolator {
private velocity = 0;
private compensationVelocity = 0;

View file

@ -1,5 +1,5 @@
import { vec2 } from 'gl-matrix';
import { Renderer } from 'sdf-2d';
import {
Circle,
Id,

View file

@ -1,6 +1,6 @@
import { vec2, vec3 } from 'gl-matrix';
import { CircleLight, Renderer } from 'sdf-2d';
import { CommandExecutors, Id, LampBase, UpdatePropertyCommand } from 'shared';
import { CircleLight } from 'sdf-2d';
import { CommandExecutors, Id, LampBase } from 'shared';
import { RenderCommand } from '../../commands/types/render';
export class LampView extends LampBase {

View file

@ -1,5 +1,5 @@
import { vec2 } from 'gl-matrix';
import { CircleLight, Renderer } from 'sdf-2d';
import { CircleLight } from 'sdf-2d';
import {
CharacterTeam,
CommandExecutors,

View file

@ -117,7 +117,7 @@ export class PlanetShape extends PolygonFactory(settings.planetEdgeCount, 0) {
super(vertices);
}
protected getObjectToSerialize(transform2d: mat2d, transform1d: number): any {
protected getObjectToSerialize(transform2d: mat2d, _: number): any {
const transformedVertices = (this as any).actualVertices.map((v: vec2) =>
vec2.transformMat2d(vec2.create(), v, transform2d),
);

View file

@ -52,7 +52,7 @@ export abstract class SoundHandler {
return sound;
}
public static play(sound: Sounds, volume: number = 1) {
public static play(sound: Sounds, volume = 1) {
if (!this.initialized || !OptionsHandler.options.soundsEnabled) {
return;
}