Skip to content

idmitriev/eslint-plugin-better

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Name Description Default Configuration
no-classes Forbids use of classes. 'no-classes': 0
no-deletes Forbids use of delete. 'no-deletes': 2
no-exceptions Forbids throwing and catching errors. 'no-exceptions': 2
no-exports Forbids use of export keyword. 'no-exports': 0
no-fors Forbids use for, for-in, for of statements. 'no-fors': 2
no-function-expressions Forbids use function expressions. 'no-function-expressions': 0
no-ifs Forbids use of if statements. 'no-ifs': 2
no-imports Forbids use of import keyword. 'no-imports': 0
no-instanceofs Forbids instanceof operator. 'no-instanceofs': 2
no-new Forbids use of new. 'no-new': 2,
no-nulls Forbids use of null. 'no-nulls': 2
no-reassigns Forbids reassigning variables. 'no-reassigns': 2
no-switches Forbids use of switch statement. 'no-switches': 2
no-this Forbids use of this. 'no-this': 2
no-typeof Forbids typeof operator. 'no-typeofs': 2
no-undefined Forbids use of undefined. 'no-undefined': 0
no-variable-declaration Forbids declaring variables. 'no-variable-declaration': 0
no-whiles Forbids use while, do-while statements. 'no-whiles': 2
must-return Every branch of every function should have a return statement. 'must-return': 2
explicit-return Stricter version of must-return: every function should have a top level return statement. 'explicit-return': 2

About

Avoid some language features to write better code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published