Q . Regarding question above, since some accustom to chop eggs and raw onions on Shabbos by the table, for a number of reasons such as the chopping should be done ‘samuch leseuda’ (right before the meal), is there an issue if one peels the onions before Shabbos?
A. On question 1366 regarding leaving overnight onions when some outer skin is left or if it is covered with oil or salt. Also nowadays since the nature of things has changed if it is permitted at least bedieved, when already done, and one does not have to throw them out, we wrote: The source of this Halacha is in Talmud (Nida 17a) that rules one may not eat a peeled egg, onion or garlic clove that was left overnight, because of the ruach ra’ah (spirit of impurity) that rests upon them. This applies even if it was left in a refrigerator or other sealed container. (Hakashrus 18: 11, however Rivavos Efraim 3: 495 permits a left over onion wrapped in aluminum foil)
Shevet Halevy (6: 110: 5) and others maintain that the reason of not eating the above items is not because they present today a physical danger, but rather a spiritual one based on the ruach ra’ah they posses. Tosafos (Yuma 77b) and others opine that this type of prohibitions have changed with the times. The fact that the Rambam, Tur and Shulchan Aruch omitted these prohibitions, is indeed a reflection of the change (See also: Yam Shel Shlomo Chullin 8:12, Mordechai Shabbos p. 161, Magen Avraham O.H. 173:1, Darchei Teshuva 74, Kaf Hachaim Y.D. 116:92, , Minchas Yitzchok 2:68:13, 6:74, Oz Nidberu 11:47, et. al.)
Horav Shlomo Miller’s Shlit”a opinion is that many Poskim maintain that this halacha should be observed and that is still the minhag of many today. (See also; Shulchan Aruch Harav Shemiras Haguf 7, Daas Torah 513: p. 639, Sdei Chemed Lamed klal 141:31 p. 372, Ta’amei Haminhagim (lekutim) page 497:16, Lekutei Halachos Chofetz Chaim Nida ibid. Ben Ish Chai Pinchas 2:14, Maharsham 4: 148, Darchei Teshuva 116:74, Kaf Hachaim 540:1, Igros Moshe Y.D. 3:20, Be’er Moshe 3:115, Yabia Omer Y.D. 2:7, Ha’kashrus K’halacha page 243:footnote 50, Orchos Rabbeinu 1: p. 210: 16).
Rabbi A. Bartfeld as advised by Horav Shlomo Miller and Horav Aharon Miller Shlit’a