chore: fix linting errors

This commit is contained in:
SleepWalker 2020-10-11 21:19:12 +03:00 committed by ErickSkrauch
parent 831ab42155
commit cd8a5a8a8b
8 changed files with 81 additions and 70 deletions

View File

@ -41,5 +41,6 @@ export function getLocaleIconUrl(locale: string): string {
}
}
// eslint-disable-next-line @typescript-eslint/no-var-requires
return require('./flags/unknown.svg').default;
}

View File

@ -49,7 +49,7 @@ storiesOf('Components/Profile/MultiFactorAuth', module)
))
.add('Enabled', () => (
<MultiFactorAuth
isMfaEnabled={true}
isMfaEnabled
step={0}
onSubmit={(form, sendData) => {
action('onSubmit')(form, sendData);

View File

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/**
* Returns the content to be displayed on first render
*/

View File

@ -23,8 +23,8 @@ import siteName from './siteName.intl';
import PageNotFound from 'app/pages/404/PageNotFound';
const ProfileController = React.lazy(() =>
import(/* webpackChunkName: "page-profile-all" */ 'app/pages/profile/ProfileController'),
const ProfileController = React.lazy(
() => import(/* webpackChunkName: "page-profile-all" */ 'app/pages/profile/ProfileController'),
);
const RulesPage = React.lazy(() => import(/* webpackChunkName: "page-rules" */ 'app/pages/rules/RulesPage'));
const DevPage = React.lazy(() => import(/* webpackChunkName: "page-dev-applications" */ 'app/pages/dev/DevPage'));

View File

@ -11,8 +11,8 @@ import ContextProvider from './ContextProvider';
import type { History } from 'history';
const SuccessOauthPage = React.lazy(() =>
import(/* webpackChunkName: "page-oauth-success" */ 'app/pages/auth/SuccessOauthPage'),
const SuccessOauthPage = React.lazy(
() => import(/* webpackChunkName: "page-oauth-success" */ 'app/pages/auth/SuccessOauthPage'),
);
interface Props {

View File

@ -28,7 +28,12 @@ export default function storeFactory(preloadedState = {}): Store {
// Hot reload reducers
if (module.hot && typeof module.hot.accept === 'function') {
module.hot.accept('app/reducers', () => store.replaceReducer(require('app/reducers').default));
module.hot.accept('app/reducers', () =>
store.replaceReducer(
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('app/reducers').default,
),
);
}
return store;

View File

@ -38,7 +38,11 @@ Promise.all([stat(`${__dirname}/../../yarn.lock`), stat(`${__dirname}/../../dll/
return reject(err);
}
logResult(chalk.green('Dll was successfully build in %s ms'), stats.endTime! - stats.startTime!);
logResult(
chalk.green('Dll was successfully build in %s ms'),
// @ts-expect-error - something wrong with webpack types
stats.endTime - stats.startTime,
);
resolve();
});