Here are the main reasons why commented code is a code smell :

The goal of this rule is to detect commented out code only on HTML code (but not on Javascript, Java and any other language).