fix eslint.

This commit is contained in:
Nawaz Dhandala 2022-06-26 13:46:30 +01:00
parent a98d4cf3cf
commit 017c1c75d0
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
3 changed files with 31 additions and 3 deletions

View File

@ -66,7 +66,7 @@
"yield-star-spacing": "error",
"no-implicit-coercion": "error",
"no-extra-label": "error",
"multiline-comment-style": "error",
"multiline-comment-style": "off",
"no-lonely-if": "error",
"no-floating-decimal": "error",
"eqeqeq": "error",
@ -162,9 +162,9 @@
"react/jsx-pascal-case": "error",
"array-callback-return": "error",
"no-loop-func": "error",
"no-duplicate-imports": "error", /// Enable this and fix errors.
"no-duplicate-imports": "error",
"no-promise-executor-return": "error",
"capitalized-comments": "off", // turn this on after ts-migration.
"capitalized-comments": "off", // this is turned off because come commented code should not be capitalized.
"for-direction": "error",
"getter-return": "error",
"jsx-a11y/anchor-is-valid": "error",

View File

@ -0,0 +1,10 @@
import React, { useState, useEffect, FunctionComponent as FC, ReactElement as RE } from 'react';
export default {
React,
useState,
useEffect
}
export type FunctionComponent<T = {}> = FC<T>;
export type ReactElement<T = {}> = RE<T>;

View File

@ -0,0 +1,18 @@
import {
Routes,
Route as PageRoute,
useNavigate,
BrowserRouter,
useLocation,
} from 'react-router-dom';
import ReactDOM from 'react-dom/client';
export default {
Routes,
PageRoute,
useNavigate,
useLocation,
BrowserRouter,
ReactDOM
}