Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

bug: unused import is removed and two unwanted eslint rule is removed (#968)

palash-signozd102c94670de
diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js
index fb9d999579..b0234bbee3 100644
--- a/frontend/.eslintrc.js
+++ b/frontend/.eslintrc.js
@@ -105,8 +105,6 @@ module.exports = {
// eslint rules need to remove
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'off',
- 'global-require': 'off',
- '@typescript-eslint/no-var-requires': 'off',
'import/no-cycle': 'off',
'prettier/prettier': [
diff --git a/frontend/src/container/Trace/Search/AllTags/Tag/TagValue.tsx b/frontend/src/container/Trace/Search/AllTags/Tag/TagValue.tsx
index d58675ffad..1d90703246 100644
--- a/frontend/src/container/Trace/Search/AllTags/Tag/TagValue.tsx
+++ b/frontend/src/container/Trace/Search/AllTags/Tag/TagValue.tsx
@@ -1,5 +1,4 @@
import { Select } from 'antd';
-import { DefaultOptionType } from 'antd/lib/select';
import getTagValue from 'api/trace/getTagValue';
import useFetch from 'hooks/useFetch';
import React from 'react';
@@ -9,7 +8,6 @@ import { PayloadProps, Props } from 'types/api/trace/getTagValue';
import { GlobalReducer } from 'types/reducer/globalTime';
import { TraceReducer } from 'types/reducer/trace';
-import { Value } from '.';
import { SelectComponent } from './styles';
function TagValue(props: TagValueProps): JSX.Element {
diff --git a/frontend/src/container/Trace/TraceTable/index.tsx b/frontend/src/container/Trace/TraceTable/index.tsx
index b68a180ad7..951c981ddd 100644
--- a/frontend/src/container/Trace/TraceTable/index.tsx
+++ b/frontend/src/container/Trace/TraceTable/index.tsx
@@ -25,7 +25,6 @@ function TraceTable(): JSX.Element {
selectedTags,
filterLoading,
userSelectedFilter,
- filter,
isFilterExclude,
filterToFetchData,
} = useSelector<AppState, TraceReducer>((state) => state.traces);
diff --git a/frontend/src/container/TriggeredAlerts/index.tsx b/frontend/src/container/TriggeredAlerts/index.tsx
index 88ebb2e138..a3762762df 100644
--- a/frontend/src/container/TriggeredAlerts/index.tsx
+++ b/frontend/src/container/TriggeredAlerts/index.tsx
@@ -2,7 +2,6 @@ import getTriggeredApi from 'api/alerts/getTriggered';
import Spinner from 'components/Spinner';
import { State } from 'hooks/useFetch';
import React, { useCallback, useEffect, useState } from 'react';
-import { Alerts } from 'types/api/alerts/getAll';
import { PayloadProps } from 'types/api/alerts/getTriggered';
import TriggerComponent from './TriggeredAlert';
diff --git a/frontend/src/wdyr.ts b/frontend/src/wdyr.ts
index 8ba678a4d6..a69c889035 100644
--- a/frontend/src/wdyr.ts
+++ b/frontend/src/wdyr.ts
@@ -1,15 +1,17 @@
+/* eslint-disable global-require */
/// <reference types="@welldone-software/why-did-you-render" />
// ^ https://github.com/welldone-software/why-did-you-render/issues/161
import React from 'react';
if (process.env.NODE_ENV === 'development') {
- const whyDidYouRender = require('@welldone-software/why-did-you-render');
- whyDidYouRender(React, {
- trackAllPureComponents: false,
- trackExtraHooks: [[require('react-redux/lib'), 'useSelector']],
- include: [/^ConnectFunction/],
- logOnDifferentValues: true,
+ import('@welldone-software/why-did-you-render').then((whyDidYouRender) => {
+ whyDidYouRender.default(React, {
+ trackAllPureComponents: true,
+ trackHooks: true,
+ // https://github.com/welldone-software/why-did-you-render/issues/85#issuecomment-596682587
+ trackExtraHooks: [require('react-redux/lib'), 'useSelector'],
+ include: [/^ConnectFunction/],
+ logOnDifferentValues: true,
+ });
});
}
-
-export default '';
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index fcc3663f1b..4790ab4740 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -22,5 +22,13 @@
"plugins": [{ "name": "typescript-plugin-css-modules" }]
},
"exclude": ["node_modules"],
- "include": ["./src", "./babel.config.js", "./jest.config.ts"]
+ "include": [
+ "./src",
+ "./babel.config.js",
+ "./jest.config.ts",
+ "./.eslintrc.js",
+ "./__mocks__",
+ "./conf/default.conf",
+ "./public"
+ ]
}