Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/p7g/eslint-plugin-no-useless-const
- Owner: p7g
- Created: 2020-01-11T19:04:13.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T22:31:31.000Z (almost 3 years ago)
- Last Synced: 2024-10-31T17:56:51.247Z (about 2 months ago)
- Language: JavaScript
- Size: 64.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
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.