{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.2.1","keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-convert-assignment-to-arrow-function@1.2.1","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-assignment-to-arrow-function#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"d3c8276a10dd2d87ae2d92d1f0c3736c201a5b0d","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-assignment-to-arrow-function/download/@putout/plugin-convert-assignment-to-arrow-function-1.2.1.tgz","fileCount":4,"integrity":"sha512-61zaesGegMmbs8bjlLxoPVu58Q5YLFQk4q4y8525Ozjo97Kf+0HW6dvi0Yi4d9r5wWd+01rnXNIsip8vr9UrlA==","signatures":[{"sig":"MEUCIQDyYWxVmiU++4OLnJ2lUqNk77I6HIPV8AvSybmSYmmDUAIgBUJQXLIXxoqSuXJFmYzIYKdf5/fdsOcX/dql58WGwts=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4509,"size":2137,"noattachment":false,"key":"/@putout/plugin-convert-assignment-to-arrow-function/-/@putout/plugin-convert-assignment-to-arrow-function-1.2.1.tgz"},"main":"lib/convert-assignment-to-arrow-function.js","type":"commonjs","engines":{"node":">=14"},"gitHead":"a5615c6735219a7518a1bfd7c3adda98f87e9138","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.1.0","description":"🐊Putout plugin adds ability convert assignment to arrow function","directories":{},"_nodeVersion":"22.14.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^11.0.0","@putout/test":"^13.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0","eslint-plugin-putout":"^26.0.0"},"peerDependencies":{"putout":">=15"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.2.1_1742837082994_0.39927189535962104","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-convert-assignment-to-arrow-function [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-assignment-to-arrow-function.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-assignment-to-arrow-function\"npm\"\n\n> The [**assignment operator**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Assignment) (`=`) is used to assign a value to a variable. The assignment operation evaluates to the assigned value. Chaining the assignment operator is possible in order to assign a single value to multiple variables.\n\nMerged to [`@putout/plugin-assignment`](https://www.npmjs.com/package/@putout/plugin-assignment).\n>\n> An [**arrow function expression**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) is a compact alternative to a **function expression**.\n>\n> (c) MDN\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert **assignment** to **arrow** function.\n\n## Install\n\n```\nnpm i @putout/plugin-convert-assignment-to-arrow-function -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-assignment-to-arrow-function\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nconst createRegExp = a = RegExp(a, 'g');\n```\n\n## ✅ Example of correct code\n\n```js\nconst createRegExp = (a) => RegExp(a, 'g');\n```\n\n## License\n\nMIT\n","publish_time":1742837083197,"_cnpm_publish_time":1742837083197,"dist-tags":{"latest":"1.2.2"}}