I have this component using AvatarProps as type for the props :
Here's the interface declaration:
export interface AvatarProps { userName: string; userLastName: string; userImg?: string; onPress?: Function; backgroundColorAvatar?: string; editMode?: boolean; onPressEdit?: Function; editButtonIcon?: string; backgroundColorEditButton?: string; textStyle?: TextStyle;}
When running eslint, this error pops up :
5:15 error 'AvatarProps' is defined but never used
eslint is triggered on commit with lefthook from a lefthook.yml file like so :
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 --noEmitcommit-msg: parallel: true commands: commitlint: run: npx commitlint --edit
What can I do to get rid of the error in a clean way?