Unless you live under a rock, you've heard that const
is useless. Now you can
enforce the use of let
instead.
👎 Examples of incorrect code for this rule:
const abc = 123; // ERROR!
👍 Examples of correct code for this rule:
let abc = 123;
- 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.