jfmengels / eslint-plugin-fp

ESLint rules for functional programming
MIT License
970 stars 36 forks source link

no-nil false positive #28

Open graingert opened 7 years ago

graingert commented 7 years ago
 switch (ham) {
    case "spam": return 3;
    case blockTypes.skew:
    default: return 4;
  }

should pass

same with:

if (foo) {
    return 3;
} else {
    return 4;
}

I've made a PR to fix eslint-plugin-better's explicit-return rule: https://github.com/idmitriev/eslint-plugin-better/pull/3 using the consistent-return rule from eslint core