The reason a smoke detector is not required in an attached garage, is the typical building code requires an attached garage to be separated from the living quarters with a fire rated construction method, usually fire rated drywall.
Having a SD in the garage may cause nuisance alarms due to fumes, dust, humidity, etc.
All states subscribe to the National Fire Protection Association codes, but any may amend the codes, so always best to check with your local building or fire official.
The required detectors can be viewed in Section 11.5.1 of the NFPA 72 Fire Alarm Code :
NFPA 72: National Fire Alarm CodeŽ
There is no problem installing a detector in a garage, I have done so many times, with the customer made to understand the risks of nuisance alarms.
Having a CO detector also is a good idea, not just in a garage but also in areas with combustion type heating systems.