eslint-plugin-better
Version:
Avoid some language features to write better code
38 lines (31 loc) • 1.96 kB
Markdown
1]][2]
[![Davis Dependency status][3]][4]
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](https://www.youtube.com/watch?v=PSGEjv3Tqo0).
| 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 |
| explicit-return | Every function should have a return statement. | 'explicit-return': 2 |
[ ]: https://badge.fury.io/js/eslint-plugin-better.svg
[ ]: https://badge.fury.io/js/eslint-plugin-better
[ ]: https://david-dm.org/idmitriev/eslint-plugin-better.svg
[ ]: https://david-dm.org/idmitriev/eslint-plugin-better
[![NPM version][