Apply lint rule @typescript-eslint/no-empty-object-type (#29159)

* Apply lint rule @typescript-eslint/no-empty-object-type

To avoid the footgun that is https://www.totaltypescript.com/the-empty-object-type-in-typescript

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-02-04 13:41:34 +00:00
committed by GitHub
parent 8cae1e9f5e
commit 7eb969bbc2
56 changed files with 157 additions and 158 deletions

View File

@@ -101,7 +101,7 @@ interface IProps {
onNewItemChanged?(item: string): void;
}
export default class EditableItemList<P = {}> extends React.PureComponent<IProps & P> {
export default class EditableItemList<P extends object> extends React.PureComponent<IProps & P> {
protected onItemAdded = (e: ButtonEvent): void => {
e.stopPropagation();
e.preventDefault();

View File

@@ -21,9 +21,7 @@ interface IProps extends React.InputHTMLAttributes<HTMLInputElement> {
id?: string;
}
interface IState {}
export default class StyledCheckbox extends React.PureComponent<IProps, IState> {
export default class StyledCheckbox extends React.PureComponent<IProps> {
private id: string;
public static readonly defaultProps = {

View File

@@ -18,9 +18,7 @@ interface IProps extends React.InputHTMLAttributes<HTMLInputElement> {
childrenInLabel?: boolean;
}
interface IState {}
export default class StyledRadioButton extends React.PureComponent<IProps, IState> {
export default class StyledRadioButton extends React.PureComponent<IProps> {
public static readonly defaultProps = {
className: "",
childrenInLabel: true,