One of my components utilizes AvatarProps for its props:
https://i.sstatic.net/cZBl1.png
Below is the interface declaration for AvatarProps:
export interface AvatarProps {
userName: string;
userLastName: string;
userImg?: string;
onPress?: Function;
backgroundColorAvatar?: string;
editMode?: boolean;
onPressEdit?: Function;
editButtonIcon?: string;
backgroundColorEditButton?: string;
textStyle?: TextStyle;
}
Upon linting with eslint, an error message appears:
5:15 error 'AvatarProps' is defined but never used
This eslint check is triggered during commit using lefthook from a lefthook.yml file configured as follows:
pre-commit:
parallel: true
commands:
lint:
files: git diff --name-only @{push}
glob: "*.{js,ts,jsx,tsx}"
run: npx eslint {files}
types:
files: git diff --name-only @{push}
glob: "*.{js,ts, jsx, tsx}"
run: npx tsc --noEmit
commit-msg:
parallel: true
commands:
commitlint:
run: npx commitlint --edit
How can I resolve this error in a clean manner?