Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/p7g/eslint-plugin-no-useless-const

Prevent usage of const
https://github.com/p7g/eslint-plugin-no-useless-const

Last synced: about 1 month ago
JSON representation

Prevent usage of const

Awesome Lists containing this project

README

        

# no-useless-const

Unless you live under a rock, you've heard that `const` is useless. Now you can
enforce the use of `let` instead.

## Rule Details

:thumbsdown: Examples of **incorrect** code for this rule:

```js
const abc = 123; // ERROR!
```

:thumbsup: Examples of **correct** code for this rule:

```js
let abc = 123;
```

## Usage

1. Add `"no-useless-const"` to the `"plugins"` key in your eslint config.
2. Add `"no-useless-const/no-useless-const": "error"` to the `"rules"` key in
your eslint config.