Cut the eggplant into medium cubes. Crush the garlic with a knife and peel. Heat a frying pan with olive oil, add the garlic and sauté for 1 minute, until fragrant. Remove the garlic and add the eggplant to the pan. Fry until golden brown on all sides.
Add chopped tomatoes, chickpeas, chili flakes and dried basil to the pan, bring to a boil and simmer for 10 minutes, salt and pepper, add a pinch of sugar.
Meanwhile, boil the pasta in salted water until tender. Drain in a colander, reserving some of the liquid. Pour the pasta into the sauce and heat through, adding a little water if needed. Sprinkle the pasta with parsley and serve immediately.