mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Implemented strict mode for the project (broken tests, hundreds of @ts-ignore and new errors are included) [skip ci]
This commit is contained in:
committed by
SleepWalker
parent
10e8b77acf
commit
96049ad4ad
@@ -91,9 +91,7 @@ export default class Box {
|
||||
endY: number;
|
||||
}> = [];
|
||||
|
||||
// eslint-disable-next-line guard-for-in
|
||||
for (const i in boxPoints) {
|
||||
const point = boxPoints[i];
|
||||
Object.values(boxPoints).forEach(point => {
|
||||
const angle = Math.atan2(light.y - point.y, light.x - point.x);
|
||||
const endX = point.x + shadowLength * Math.sin(-angle - Math.PI / 2);
|
||||
const endY = point.y + shadowLength * Math.cos(-angle - Math.PI / 2);
|
||||
@@ -103,7 +101,7 @@ export default class Box {
|
||||
endX,
|
||||
endY,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
for (let i = points.length - 1; i >= 0; i--) {
|
||||
const n = i === 3 ? 0 : i + 1;
|
||||
|
@@ -18,8 +18,7 @@ class BsodMiddleware implements Middleware {
|
||||
async catch<T extends Resp<any>>(
|
||||
resp?: T | InternalServerError | Error,
|
||||
): Promise<T> {
|
||||
const { originalResponse }: { originalResponse?: Resp<any> } = (resp ||
|
||||
{}) as InternalServerError;
|
||||
const { originalResponse } = (resp || {}) as InternalServerError;
|
||||
|
||||
if (
|
||||
resp &&
|
||||
|
@@ -1,9 +1,13 @@
|
||||
import { Action } from 'redux';
|
||||
import { Action as ReduxAction } from 'redux';
|
||||
|
||||
export const BSOD = 'BSOD';
|
||||
interface BSoDAction extends ReduxAction {
|
||||
type: 'BSOD';
|
||||
}
|
||||
|
||||
export function bsod(): Action {
|
||||
export function bsod(): BSoDAction {
|
||||
return {
|
||||
type: BSOD,
|
||||
type: 'BSOD',
|
||||
};
|
||||
}
|
||||
|
||||
export type Action = BSoDAction;
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import { BSOD } from './actions';
|
||||
import { Action } from './actions';
|
||||
|
||||
export type State = boolean;
|
||||
|
||||
export default function(state: State = false, { type }): State {
|
||||
if (type === BSOD) {
|
||||
export default function(state: State = false, { type }: Action): State {
|
||||
if (type === 'BSOD') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user