If they don’t smell or have any other signs of reduction of quality/bacteria growth, then they should be okay. People have lipsticks from like 5 years ago that they still use - its about how you take care of it (sterilize it after use/use with sterile hands and equipment - washing your hands then touching things around your bathroom/in your makeup case etc leads to contamination), and how often you use it (bacteria from the air getting into it), as well as the preservatives in the makeup giving up the ghost (is that what the 'x months before you should chuck it' thing is about? That’s what I always thought anyway - like with food and drink).
You should always be more careful with 'wet' products though, and especially so with those that go near your eyes - in this case, expiration dates should be followed (eyeliners included).
If you want to foil eyeshadow (or use dry eye products wet), but don’t want to get moisture into the product's pot (and thus allowing bacteria to grow in it), then you can use a sterile empty sample pot. You can buy them really cheaply, and just tap a bit of product in the lid of the products container, then tap this product into the empty sample pot (or its lid). The double tap thing stops you from accidentally tipping half the jar into the sample pot/onto the floor. Pure Luxe has sample pots from 30 cents, and sifters at 10 cents (fits both 2g & 5g pots and will prevent accidentally tipping eyeshadow everywhere) with cheap shipping.
This will also work with empty palettes or dishes from art shops (though a bit more expense than sample pots). Just remember to clean after, and sterilize before use.