@putout/plugin-convert-assignment-to-declaration
🐊Putout plugin adds ability to convert 'assignment' to 'declaration'
Last updated 6 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm 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.

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

  • 1.0.1                                ...           latest (6 months ago)

2 Versions

  • 1.0.1                                ...           6 months ago
  • 1.0.0                                ...           6 months ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE