Skip to content

Commit 93b1978

Browse files
authored
refactor: remove stale no-console eslint links (#22205)
1 parent 04c31a7 commit 93b1978

15 files changed

Lines changed: 27 additions & 27 deletions

File tree

config/typescript-config-carbon/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const loadTsCompilerOpts = (path: string) => {
2525
const { errors } = opts;
2626
if (errors.length > 0) {
2727
errors.forEach((diagnostic) => {
28-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
28+
// eslint-disable-next-line no-console
2929
console.log(diagnosticToMessage(diagnostic));
3030
});
3131
throw new Error('Base TypeScript config file errors found');

packages/react/code-connect/Tile/Tile.figma.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ figma.connect(
181181
// },
182182
// example: ({ titletext, descriptiontext }) => (
183183
// <ExpandableTile
184-
// // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
184+
// // eslint-disable-next-line no-console
185185
// onClick={() => console.log('click')}
186186
// tileCollapsedIconText="Interact to Expand tile"
187187
// tileExpandedIconText="Interact to Collapse tile">

packages/react/src/components/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const Button: ButtonComponent = React.forwardRef(
167167
} = props;
168168

169169
if (ButtonImageElement && !children && !iconDescription) {
170-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
170+
// eslint-disable-next-line no-console
171171
console.error(
172172
'Button: renderIcon property specified without also providing an iconDescription property. ' +
173173
'This may impact accessibility for screen reader users.'

packages/react/src/components/ChatButton/ChatButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright IBM Corp. 2024, 2025
2+
* Copyright IBM Corp. 2024, 2026
33
*
44
* This source code is licensed under the Apache-2.0 license found in the
55
* LICENSE file in the root directory of this source tree.
@@ -87,7 +87,7 @@ const ChatButton = React.forwardRef<HTMLButtonElement, ChatButtonProps>(
8787
} else {
8888
// Check if size is valid and warn if not
8989
if (size && !allowedSizes.includes(size as ChatButtonSize)) {
90-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
90+
// eslint-disable-next-line no-console
9191
console.error(
9292
`Invalid size "${size}" provided to ChatButton. Size must be one of: ${allowedSizes.join(
9393
', '

packages/react/src/components/ErrorBoundary/ErrorBoundaryContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright IBM Corp. 2016, 2023
2+
* Copyright IBM Corp. 2016, 2026
33
*
44
* This source code is licensed under the Apache-2.0 license found in the
55
* LICENSE file in the root directory of this source tree.
@@ -13,7 +13,7 @@ export interface ErrorBoundaryContextType {
1313

1414
export const ErrorBoundaryContext = createContext<ErrorBoundaryContextType>({
1515
log(error, info) {
16-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
16+
// eslint-disable-next-line no-console
1717
console.log(info.componentStack);
1818
},
1919
});

packages/react/src/components/IconButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const IconButton = forwardRef<unknown, IconButtonProps>(
183183
);
184184

185185
if (badgeCount && (kind !== 'ghost' || size !== 'lg')) {
186-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
186+
// eslint-disable-next-line no-console
187187
console.warn(
188188
"The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'"
189189
);

packages/react/src/components/Tabs/Tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function Tabs({
146146
}: TabsProps) {
147147
const baseId = useId('ccs');
148148
if (dismissable && !onTabCloseRequest) {
149-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
149+
// eslint-disable-next-line no-console
150150
console.error(
151151
'dismissable property specified without also providing an onTabCloseRequest property.'
152152
);

packages/react/src/components/Tag/Tag.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ const TagBase = React.forwardRef<
157157
const prefix = usePrefix();
158158
const tagRef = useRef<HTMLElement>(null);
159159
if (filter) {
160-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
160+
// eslint-disable-next-line no-console
161161
console.warn(
162162
'The `filter` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.'
163163
);
164164
}
165165

166166
if (onClose) {
167-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
167+
// eslint-disable-next-line no-console
168168
console.warn(
169169
'The `onClose` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.'
170170
);

packages/react/src/components/TextInput/PasswordInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ const PasswordInput = forwardRef<unknown, PasswordInputProps>(
349349
align = tooltipPosition;
350350
}
351351
if (!hidePasswordLabel || hidePasswordLabel.trim() === '') {
352-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
352+
// eslint-disable-next-line no-console
353353
console.warn('Warning: The "hidePasswordLabel" should not be blank.');
354354
} else if (!showPasswordLabel || showPasswordLabel.trim() === '') {
355-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
355+
// eslint-disable-next-line no-console
356356
console.warn('Warning: The "showPasswordLabel" should not be blank.');
357357
}
358358
const input = (

packages/react/src/internal/useNoInteractiveChildren.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const useNoInteractiveChildren = (
1919

2020
if (node) {
2121
const errorMessage = `Error: ${message}.\n\nInstead found: ${node.outerHTML}`;
22-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
22+
// eslint-disable-next-line no-console
2323
console.error(errorMessage);
2424
throw new Error(errorMessage);
2525
}

0 commit comments

Comments
 (0)