@putout/plugin-convert-any-to-primitive
putout plugin adds ability to convert any to primitive type
Last updated 3 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-convert-any-to-primitive 
SYNC missed versions from official npm registry.

@putout/plugin-convert-any-to-primitive NPM version

🐊Putout plugin adds ability to convert any to primitive. Moved to @putout/plugin-typescript.

Install

npm i @putout/plugin-convert-any-to-primitive -D

Rule

Rule convert-any-to-primitive is enabled by default for ts and tsx files, to disable add to .putout.json:

{
    "rules": {
        "convert-any-to-primitive": "off"
    }
}

❌ Incorrect code example

const x: any = 5;

✅ Correct code Example

const x: number = 5;

License

MIT

Current Tags

  • 1.0.2                                ...           latest (3 years ago)

3 Versions

  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years 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