eslint-plugin-no-useless-const
v1.0.1
Published
Prevent usage of the (useless) const keyword
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:
const abc = 123; // ERROR!:thumbsup: Examples of correct code for this rule:
let abc = 123;Usage
- Add
"no-useless-const"to the"plugins"key in your eslint config. - Add
"no-useless-const/no-useless-const": "error"to the"rules"key in your eslint config.
