I encountered an eslint error while attempting to commit the branch
147:14 error Expected an assignment or function call and instead saw an expression
@typescript-eslint/no-unused-expressions
I'm struggling to identify the issue in the code, even after trying to include
// eslint-disable-next-line no-unused-expressions
or
/* eslint-disable no-unused-expressions */
However, the error persists
useEffect(() => {
const setFile:any = []
const addedFiles:any = acceptedFiles && acceptedFiles.map((item:File) => {
if(item !== null){
return {
title: item?.name as string,
fileName: item?.name as string,
mediaType: 'SO',
compositionType: 'O',
album: ''
};
}else {[]}
});
setFile.push(addedFiles)
if(addedFiles){ // **** the line 147
setFileList([...addedFiles, ...fileList])
}
acceptedFiles && acceptedFiles.map((item:File) => {
onUpload({
title: item?.name as string,
fileName: item?.name as string,
mediaType: 'SO',
compositionType: 'O',
album: ''
});
})
}, [acceptedFiles]);
return (...