add husky checks

This commit is contained in:
2020-10-12 15:43:13 +03:00
committed by Stepan Usatiuk
parent ede7976d56
commit 291f78f265
13 changed files with 202 additions and 20 deletions

2
frontend/.eslintignore Normal file
View File

@@ -0,0 +1,2 @@
*.css
*.scss

View File

@@ -53,6 +53,7 @@
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off"
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/unbound-method": "off"
}
}

View File

@@ -3,7 +3,8 @@
"scripts": {
"start": "parcel serve src/index.html",
"build": "parcel build src/index.html",
"lint": "eslint ./src/** --ext .js,.jsx,.ts,.tsx",
"lint": "eslint ./src/** --ext .js,.jsx,.ts,.tsx && tsc --noEmit",
"lint-fix": "eslint ./src/** --ext .js,.jsx,.ts,.tsx --fix",
"test": "jest"
},
"postcss": {
@@ -61,4 +62,4 @@
"@types/react-router-dom": "^5.1.6",
"@types/sass": "^1.16.0"
}
}
}

View File

@@ -23,7 +23,7 @@ export class AuthScreenComponent extends React.PureComponent<IAuthScreenProps> {
}
public render() {
const { location } = this.props.history;
const { from } = this.props.location.state || { from: "/" };
const { from } = (this.props.location.state as any) || { from: "/" };
const { loggedIn } = this.props;
return loggedIn ? (
<Redirect to={from} />

View File

@@ -10,7 +10,7 @@ import { IAppState } from "~redux/reducers";
interface ILoginComponentProps extends RouteComponentProps {
inProgress: boolean;
error: string;
error: string | null;
spinner: boolean;
login: (username: string, password: string) => void;
}

View File

@@ -10,7 +10,7 @@ import { IAppState } from "~redux/reducers";
interface ISignupComponentProps extends RouteComponentProps {
inProgress: boolean;
error: string;
error: string | null;
spinner: boolean;
signup: (username: string, password: string, email: string) => void;
}

View File

@@ -6,5 +6,6 @@
}
.bp3-dark {
#overview {}
}
#overview {
}
}

View File

@@ -27,10 +27,10 @@ const localSettingsPersistConfig = {
};
export const rootReducer = combineReducers({
auth: persistReducer<IAuthState>(authPersistConfig, authReducer),
auth: persistReducer<IAuthState>(authPersistConfig, authReducer as any),
user: userReducer,
localSettings: persistReducer(
localSettingsPersistConfig,
localSettingsReducer,
localSettingsReducer as any,
),
});

View File

@@ -16,6 +16,7 @@
"allowSyntheticDefaultImports": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"skipLibCheck": true,
"baseUrl": "./src",
"paths": {
"~*": [