$ npm install @putout/plugin-convert-const-to-let
The
TypeError
object represents an error when attempting to modify a value that cannot be changed.(c) MDN
🐊Putout plugin adds ability to convert const
to let
to avoid TypeError
.
Check out in 🐊Putout Editor.
npm i @putout/plugin-convert-const-to-let -D
{
"rules": {
"convert-const-to-let": "on"
}
}
const a = 5;
a = 3;
let a = 5;
a = 3;
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE