Skip to content

Commit 4f2ba8d

Browse files
committed
updated the eslint config
1 parent 27a6de3 commit 4f2ba8d

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export default [
8181
camelcase: [
8282
'error',
8383
{
84-
ignoreDestructuring: true
84+
ignoreDestructuring: true,
85+
allow: ['^t_[global|chart]', '^chart_']
86+
// TODO: Remove 'chart_' from the allowed patterns after updating all chart examples to use the 't_chart_' format
8587
}
8688
],
8789
'constructor-super': 'error',

packages/react-charts/src/victory/components/ChartBar/examples/ChartBarAlertsTimeline.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ import {
77
ChartTooltip,
88
ChartVoronoiContainer
99
} from '@patternfly/react-charts/victory';
10-
/* eslint-disable-next-line */
1110
import t_global_color_status_danger_100 from '@patternfly/react-tokens/dist/esm/t_global_color_status_danger_100';
12-
/* eslint-disable-next-line */
1311
import t_global_color_status_info_100 from '@patternfly/react-tokens/dist/esm/t_global_color_status_info_100';
14-
/* eslint-disable-next-line */
1512
import t_global_color_status_warning_100 from '@patternfly/react-tokens/dist/esm/t_global_color_status_warning_100';
1613

1714
interface AlertData {
@@ -77,23 +74,19 @@ export const ChartBarAlertsTimeline: React.FunctionComponent = () => {
7774
];
7875

7976
const legendData = [
80-
/* eslint-disable-next-line */
8177
{ name: 'Danger', symbol: { fill: t_global_color_status_danger_100.var } },
82-
/* eslint-disable-next-line */
78+
8379
{ name: 'Info', symbol: { fill: t_global_color_status_info_100.var } },
84-
/* eslint-disable-next-line */
80+
8581
{ name: 'Warning', symbol: { fill: t_global_color_status_warning_100.var } }
8682
];
8783

8884
const getSeverityColor = (severity) => {
8985
if (severity === 'danger') {
90-
/* eslint-disable-next-line */
9186
return t_global_color_status_danger_100.var;
9287
} else if (severity === 'warn') {
93-
/* eslint-disable-next-line */
9488
return t_global_color_status_warning_100.var;
9589
} else {
96-
/* eslint-disable-next-line */
9790
return t_global_color_status_info_100.var;
9891
}
9992
};

0 commit comments

Comments
 (0)