@putout/plugin-convert-assignment-to-declaration
v2.0.1
Published
šPutout plugin adds ability to convert 'assignment' to 'declaration'
Downloads
6,555
Maintainers
Readme
@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.
Install
npm i @putout/plugin-convert-assignment-to-declaration -DRule
{
"rules": {
"convert-assignment-to-declaration": "on"
}
}ā Example of incorrect code
a = 5;ā Example of correct code
const a = 5;License
MIT
