Skip to content
21 changes: 21 additions & 0 deletions src/base/FormHelperText/FormHelperText.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import MuiFormHelperText, {
FormHelperTextProps as MuiFormHelperTextProps
} from '@mui/material/FormHelperText';
import React from 'react';

export interface SistentFormHelperTextProps extends MuiFormHelperTextProps {
// Custom props for future extension of the Sistent wrapper
}
Comment on lines +6 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Replace the empty interface with a type alias.

SistentFormHelperTextProps adds no members, so this triggers @typescript-eslint/no-empty-object-type and can fail linting.

Proposed fix
-export interface SistentFormHelperTextProps extends MuiFormHelperTextProps {
-  // Custom props for future extension of the Sistent wrapper
-}
+export type SistentFormHelperTextProps = MuiFormHelperTextProps;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export interface SistentFormHelperTextProps extends MuiFormHelperTextProps {
// Custom props for future extension of the Sistent wrapper
}
export type SistentFormHelperTextProps = MuiFormHelperTextProps;
🧰 Tools
🪛 ESLint

[error] 6-6: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/base/FormHelperText/FormHelperText.tsx` around lines 6 - 8, Replace the
empty SistentFormHelperTextProps interface with a type alias that preserves its
extension of MuiFormHelperTextProps, removing the unused empty-interface
declaration and its comment.

Source: Linters/SAST tools


export const FormHelperText = React.forwardRef<HTMLParagraphElement, SistentFormHelperTextProps>(
({ children, ...props }, ref) => {
return (
<MuiFormHelperText ref={ref} {...props}>
{children}
</MuiFormHelperText>
);
}
);
FormHelperText.displayName = 'FormHelperText';

export default FormHelperText;
1 change: 1 addition & 0 deletions src/base/FormHelperText/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './FormHelperText';
1 change: 1 addition & 0 deletions src/base/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ export * from './Toolbar';
export * from './Tooltip';
export * from './Typography';
export * from './Zoom';
export * from './FormHelperText';
Loading