mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
fix eslint.
This commit is contained in:
parent
a98d4cf3cf
commit
017c1c75d0
@ -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",
|
||||
|
10
CommonUI/src/Utils/React.ts
Normal file
10
CommonUI/src/Utils/React.ts
Normal 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>;
|
18
CommonUI/src/Utils/Router.ts
Normal file
18
CommonUI/src/Utils/Router.ts
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user