mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 22:46:06 +08:00
* add no-array-index-key rule * fix array indexing errors * convert string concat to template strings * make component key simpler * remove unused var
This commit is contained in:
parent
271ffbd1a1
commit
5e4cff7ae2
@ -41,6 +41,7 @@ module.exports = {
|
|||||||
'react/prop-types': 'off',
|
'react/prop-types': 'off',
|
||||||
'@typescript-eslint/explicit-function-return-type': 'error',
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
||||||
'@typescript-eslint/no-var-requires': 0,
|
'@typescript-eslint/no-var-requires': 0,
|
||||||
|
'react/no-array-index-key': 2,
|
||||||
'linebreak-style': ['error', 'unix'],
|
'linebreak-style': ['error', 'unix'],
|
||||||
|
|
||||||
// simple sort error
|
// simple sort error
|
||||||
|
@ -13,8 +13,8 @@ const App = (): JSX.Element => (
|
|||||||
<AppLayout>
|
<AppLayout>
|
||||||
<Suspense fallback={<Spinner size="large" tip="Loading..." />}>
|
<Suspense fallback={<Spinner size="large" tip="Loading..." />}>
|
||||||
<Switch>
|
<Switch>
|
||||||
{routes.map(({ path, component, exact }, index) => (
|
{routes.map(({ path, component, exact }) => (
|
||||||
<Route key={index} exact={exact} path={path} component={component} />
|
<Route key={`${path}`} exact={exact} path={path} component={component} />
|
||||||
))}
|
))}
|
||||||
<Redirect from="/" to={ROUTES.APPLICATION} />
|
<Redirect from="/" to={ROUTES.APPLICATION} />
|
||||||
<Route component={NotFound} />
|
<Route component={NotFound} />
|
||||||
|
@ -52,7 +52,7 @@ const QuerySection = ({
|
|||||||
<Query
|
<Query
|
||||||
currentIndex={index}
|
currentIndex={index}
|
||||||
selectedTime={selectedTime}
|
selectedTime={selectedTime}
|
||||||
key={e.query + index}
|
key={`${e.query} ${e.query.length}`}
|
||||||
preQuery={e.query}
|
preQuery={e.query}
|
||||||
preLegend={e.legend || ''}
|
preLegend={e.legend || ''}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user