mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-16 23:00:51 +00:00
fix eslint.
This commit is contained in:
parent
a98d4cf3cf
commit
017c1c75d0
3 changed files with 31 additions and 3 deletions
|
|
@ -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…
Add table
Reference in a new issue