Home

Awesome

The better parts

NPM version Davis Dependency status

Javascript is a terribly designed language, fortunately it has a decent subset. eslint-plugin-better is a set of rules to help you avoid some of the bad parts and write better code.

Inspired by this talk.

Rules

NameDescriptionDefault Configuration
no-classesForbids use of classes.'no-classes': 0
no-deletesForbids use of delete.'no-deletes': 2
no-exceptionsForbids throwing and catching errors.'no-exceptions': 2
no-exportsForbids use of export keyword.'no-exports': 0
no-forsForbids use for, for-in, for of statements.'no-fors': 2
no-function-expressionsForbids use function expressions.'no-function-expressions': 0
no-ifsForbids use of if statements.'no-ifs': 2
no-importsForbids use of import keyword.'no-imports': 0
no-instanceofsForbids instanceof operator.'no-instanceofs': 2
no-newForbids use of new.'no-new': 2,
no-nullsForbids use of null.'no-nulls': 2
no-reassignsForbids reassigning variables.'no-reassigns': 2
no-switchesForbids use of switch statement.'no-switches': 2
no-thisForbids use of this.'no-this': 2
no-typeofForbids typeof operator.'no-typeofs': 2
no-undefinedForbids use of undefined.'no-undefined': 0
no-variable-declarationForbids declaring variables.'no-variable-declaration': 0
no-whilesForbids use while, do-while statements.'no-whiles': 2
must-returnEvery branch of every function should have a return statement.'must-return': 2
explicit-returnStricter version of must-return: every function should have a top level return statement.'explicit-return': 2