Add rule: Always throw Error object
Add rule: Always throw Error object

The following are errors:

throw "error";

throw 0;

throw undefined;

throw null;

The following are not errors:

throw new Error();

throw new Error("error");

var e = new Error("error");
throw e;

try {
    throw new Error("error");
} catch (e) {
    throw e;
}

tjwudi/standard,feross/standard,LinusU/standard,febeling/standard,John-Lin/standard,mattdesl/standard,LinusU/standard-engine,reggi/standard,ricardofbarros/standard-engine,ricardofbarros/standard,watson/standard-engine,jden/jsw,Flet/standard,cesarandreu/standard,kublaj/standard,yamafaktory/standard,bengl/standard,xjamundx/standard,maxogden/standard,medseek-engineering/standard,koddsson/standard,feross/standard,matthieuprat/standard,uber/standard,beni55/standard,salespreso/standard,Holowaychitos/standard,bradparks/standard,Eruant/standard,Flet/standard-engine,SimenB/standard,tk120404/standard,leecade/standard,keis/standard,icemobilelab/icemobile-standard,yudiutomo/standard,standard/standard,JedWatson/happiness,SimenB/standard,jasonpincin/standard,pombredanne/standard-1,stevemao/standard,timbl/standard,JedWatson/happiness,mnquintana/standard,driftyco/standard,TheLady/standard,LinusU/standard,standard/standard