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

@ -23,17 +23,9 @@
},
"devDependencies": {
"@types/socket.io-client": "^1.4.34",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
"clean-webpack-plugin": "^3.0.0",
"common-config-webpack-plugin": "^2.0.1",
"css-loader": "^1.0.1",
"eslint": "^7.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-json-format": "^2.0.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-unused-imports": "^0.1.3",
"firebase": "^7.22.0",
"gl-matrix": "^3.3.0",
"html-webpack-inline-source-plugin": "^1.0.0-beta.2",
@ -42,7 +34,6 @@
"image-config-webpack-plugin": "^2.0.0",
"mini-css-extract-plugin": "^0.9.0",
"postcss-loader": "^3.0.0",
"prettier": "^2.0.5",
"resize-observer-polyfill": "^1.5.1",
"resolve-url-loader": "^3.1.1",
"sass": "^1.27.0",

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;
}