Skip to content

Commit c3e60d2

Browse files
committed
fix lint
1 parent 7cfa0cf commit c3e60d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+83
-94
lines changed

web/eslint.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ export default [
66
{
77
ignores: [
88
"**/node_modules/*",
9-
"**/dist/*"
9+
"**/dist/*",
10+
"**/cypress/*",
11+
"**/i18next-parser.config.js",
12+
"**/setup-tests.tsx",
13+
"**/webpack.*.ts"
1014
]
1115
},
1216
eslint.configs.recommended,
@@ -33,9 +37,11 @@ export default [
3337
"max-len": ["warn", {
3438
code: 170,
3539
}],
40+
"no-case-declarations": "off",
3641
"react-hooks/rules-of-hooks": "error",
3742
"react-hooks/exhaustive-deps": "warn",
3843
"react/prop-types": "off",
44+
"@typescript-eslint/no-require-imports": "off",
3945
"@typescript-eslint/no-empty-interface": "off",
4046
"@typescript-eslint/no-non-null-assertion": "off",
4147
},

web/moduleMapper/dummy.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ export class Dummy extends Error {
1313
}
1414
}
1515

16+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1617
export function isModelFeatureFlag(e: never) {
1718
return null;
1819
}
1920

21+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2022
export function useResolvedExtensions(isModelFeatureFlag: boolean) {
2123
return [
2224
[{

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"lint": "./node_modules/.bin/eslint \"./src/**/*.{ts,tsx}\"",
2424
"format": "pretty-quick --branch main",
2525
"format-all": "prettier --write \"./src/**/*.{ts,tsx}\" && npm run fix-imports",
26-
"fix-imports": "eslint --no-inline-config --parser '@typescript-eslint/parser' --plugin 'unused-imports' --plugin 'react-hooks' --rule 'unused-imports/no-unused-imports:error' --fix",
26+
"fix-imports": "eslint --parser '@typescript-eslint/parser' --plugin 'unused-imports' --plugin 'react-hooks' --rule 'unused-imports/no-unused-imports:error' --fix",
2727
"generate-doc": "typedoc --sort source-order --categorizeByGroup false --githubPages false --readme none --disableSources --out docs src/api/ipfix.ts --hideBreadcrumbs true --hideInPageTOC true"
2828
},
2929
"devDependencies": {

web/src/app.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-len */
21
import {
32
Brand,
43
Button,

web/src/components/__tests__/common.spec.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ describe('common test functions', () => {
2525
const wrapper = mount(<></>);
2626

2727
it('should run without error', async () => {
28-
// eslint-disable-next-line @typescript-eslint/no-empty-function
2928
await actOn(() => {}, wrapper);
3029
await waitForRender(wrapper);
3130
});

web/src/components/alerts/fetcher.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import AlertBanner from './banner';
55

66
import { murmur3 } from 'murmurhash-js';
77

8+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
89
export interface AlertFetcherProps {}
910

1011
export const AlertFetcher: React.FC<AlertFetcherProps> = ({ children }) => {

web/src/components/drawer/netflow-traffic-drawer.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export interface NetflowTrafficDrawerProps {
101101
setSelectedElement: (v: GraphElementPeer | undefined) => void;
102102
}
103103

104-
// eslint-disable-next-line react/display-name
105104
export const NetflowTrafficDrawer: React.FC<NetflowTrafficDrawerProps> = React.forwardRef(
106105
(props, ref: React.Ref<NetflowTrafficDrawerHandle>) => {
107106
const overviewRef = React.useRef<NetflowOverviewHandle>(null);
@@ -218,7 +217,6 @@ export const NetflowTrafficDrawer: React.FC<NetflowTrafficDrawerProps> = React.f
218217
);
219218
} else if (match === 'all' && !hasIndexFields(filters.list)) {
220219
reason = t(
221-
// eslint-disable-next-line max-len
222220
'Add Namespace, Owner or Resource filters (which use indexed fields), or decrease limit / range, to improve the query performance'
223221
);
224222
} else {

web/src/components/dropdowns/query-options-panel.tsx

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ export const QueryOptionsPanel: React.FC<QueryOptionsProps> = ({
102102
<div className="pf-v6-c-menu__group">
103103
<Tooltip
104104
content={t(
105-
// eslint-disable-next-line max-len
106105
'Log type to query. A conversation is an aggregation of flows between same peers. Only ended conversations will appear in Overview and Topology tabs.'
107106
)}
108107
>
@@ -124,13 +123,9 @@ export const QueryOptionsPanel: React.FC<QueryOptionsProps> = ({
124123
disabled
125124
? opt.value === 'allConnections'
126125
? t(
127-
// eslint-disable-next-line max-len
128126
'Only available when FlowCollector.processor.logTypes option equals "CONNECTIONS", "ENDED_CONNECTIONS" or "ALL"'
129127
)
130-
: t(
131-
// eslint-disable-next-line max-len
132-
'Only available when FlowCollector.processor.logTypes option equals "FLOWS" or "ALL"'
133-
)
128+
: t('Only available when FlowCollector.processor.logTypes option equals "FLOWS" or "ALL"')
134129
: undefined
135130
}
136131
>
@@ -174,14 +169,10 @@ export const QueryOptionsPanel: React.FC<QueryOptionsProps> = ({
174169
disabled
175170
? opt.value === 'prom'
176171
? t(
177-
// eslint-disable-next-line max-len
178172
'Only available when FlowCollector.prometheus.enable is true for Overview and Topology tabs'
179173
)
180174
: opt.value === 'loki'
181-
? t(
182-
// eslint-disable-next-line max-len
183-
'Only available when FlowCollector.loki.enable is true'
184-
)
175+
? t('Only available when FlowCollector.loki.enable is true')
185176
: undefined
186177
: undefined
187178
}
@@ -230,12 +221,7 @@ export const QueryOptionsPanel: React.FC<QueryOptionsProps> = ({
230221
</div>
231222
)}
232223
<div className="pf-v6-c-menu__group">
233-
<Tooltip
234-
content={t(
235-
// eslint-disable-next-line max-len
236-
'Whether each query result has to match all the filters or just any of them'
237-
)}
238-
>
224+
<Tooltip content={t('Whether each query result has to match all the filters or just any of them')}>
239225
<div className="pf-v6-c-menu__group-title">
240226
<Content component={ContentVariants.p}>
241227
{t('Match filters')} <InfoAltIcon />
@@ -295,10 +281,7 @@ export const QueryOptionsPanel: React.FC<QueryOptionsProps> = ({
295281
trigger={disabled ? 'mouseenter focus' : ''}
296282
content={
297283
disabled
298-
? t(
299-
// eslint-disable-next-line max-len
300-
'Only available using eBPF with FlowCollector.agent.ebpf.features containing "PacketDrop"'
301-
)
284+
? t('Only available using eBPF with FlowCollector.agent.ebpf.features containing "PacketDrop"')
302285
: undefined
303286
}
304287
>

web/src/components/dynamic-loader/dynamic-loader.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const navigate = (to: string, opts?: any) => {
3939
}
4040
};
4141

42+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
4243
export const DynamicLoader: React.FC<{}> = ({ children }) => {
4344
loadNavFunction();
4445
return <>{children ? children : ''}</>;

web/src/components/guided-tour/guided-tour.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface GuidedTourPopoverProps {
3131
}
3232

3333
const onIndexChangeFunctions: IndexChangeFunction[] = [];
34-
// eslint-disable-next-line react/display-name
34+
3535
export const GuidedTourPopover: React.FC<GuidedTourPopoverProps> = React.forwardRef(
3636
(props, ref: React.Ref<GuidedTourHandle>) => {
3737
const { t } = useTranslation('plugin__netobserv-plugin');

0 commit comments

Comments
 (0)