$ cnpm install @putout/plugin-convert-assignment-to-declaration
The assignment (
=) operator is used to assign a value to a variable or property.(c) MDN
The
constdeclaration declares block-scoped local variables. The value of a constant can't be changed through reassignment using the assignment operator, but if a constant is an object, its properties can be added, updated, or removed.(c) MDN
????Putout plugin adds ability to convert assignment to declaration.
Checkout in ????Putout Editor.
Merged to @putout/plugin-assignment.
npm i @putout/plugin-convert-assignment-to-declaration -D
{
"rules": {
"convert-assignment-to-declaration": "on"
}
}
a = 5;
const a = 5;
MIT
Copyright 2013 - present © cnpmjs.org | Home |