In a large deep heavy skillet heat oil over medium-high heat and saute onion, stirring occasionally, until softened.
Add eggplant and salt and saute, stirring frequently, until eggplant is lightly browned.
Add 1/2 cup water to eggplant mixture and cook, covered, over medium heat, stirring occasionally, adding more water, 1/4 cup at a time, if mixture becomes dry, until eggplant is tender, about 10 minutes.
Add tomatoes with juice and simmer for 5 minutes, or until mixture has a sauce-like consistency.
Stir in garlic and basil and season with salt.
While sauce is simmering, cook pasta al dente (firm to the bite) according to package directions.
Drain well and add cooked pasta to sauce.
Toss to combine.
Top with a dollop of ricotta per individual serving, if desired.