In American English, "e.g." should be surrounded by commas. And programming already favors American spelling variants (e.g., "color" instead of "colour"). "The consensus seems to be in favor of the comma in American usage; against it in British usage." (https://www.dailywritingtips.com/comma-after-i-e-and-e-g/)
Regarding using "/s" for plurals: https://english.stackexchange.com/a/576145/296389. I didn't change it to "(s)" or "[s]", because, in a generic placeholder context, plurals can also mean single elements.