@putout/plugin-convert-assignment-to-declaration
🐊Putout plugin adds ability to convert 'assignment' to 'declaration'
Last updated 2 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-convert-assignment-to-declaration 
SYNC missed versions from official npm registry.

@putout/plugin-convert-assignment-to-declaration NPM version

The assignment (=) operator is used to assign a value to a variable or property.

(c) MDN

The const declaration 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 -D

Rule

{
    "rules": {
        "convert-assignment-to-declaration": "on"
    }
}

❌ Example of incorrect code

a = 5;

✅ Example of correct code

const a = 5;

License

MIT

Current Tags

  • 2.0.1                                ...           latest (a year ago)

4 Versions

  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |