eslint picking out bad code smell