Cook the eggplant by grilling, sauteing, or baking in the oven until it is just cooked through, but not overcooked. While it is still warm, layer the eggplant in a bowl or other container with the sliced onion and basil leaves. In a separate bowl, mix together the vinegar, oil, garlic, salt, black pepper, and hot pepper. Pour the marinade over the eggplant. Gently lift the eggplant layers to allow the marinade to permeate. Cover and refrigerate the eggplant for at least an hour. It is delicious chilled or at room temperature, and will keep for two weeks.