{"_id":"@putout/plugin-convert-assignment-to-arrow-function","_rev":"4156795","name":"@putout/plugin-convert-assignment-to-arrow-function","description":"🐊Putout plugin adds ability convert assignment to arrow function","dist-tags":{"latest":"1.2.2"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:29:11.000Z","created":"2021-02-28T13:41:17.767Z","1.2.2":"2025-03-24T17:38:23.379Z","1.2.1":"2025-03-24T17:24:43.197Z","1.2.0":"2021-03-29T17:33:16.408Z","1.1.0":"2021-03-29T17:25:41.045Z","1.0.0":"2021-02-28T13:41:17.767Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"versions":{"1.2.2":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.2.2","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability convert assignment to arrow function","homepage":"https://github.com/coderaiser/putout/tree/v38.5.7/packages/plugin-convert-assignment-to-arrow-function#readme","main":"lib/convert-assignment-to-arrow-function.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^26.0.0","madrun":"^11.0.0"},"peerDependencies":{"putout":">=15"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-convert-assignment-to-arrow-function@1.2.2","gitHead":"554dae8f6f20e26966d35afbbef98d682d9fede9","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.14.0","_npmVersion":"11.1.0","dist":{"shasum":"833ef019635755abcf954a0a67c9404a4066c3b9","size":2141,"noattachment":false,"key":"/@putout/plugin-convert-assignment-to-arrow-function/-/@putout/plugin-convert-assignment-to-arrow-function-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-assignment-to-arrow-function/download/@putout/plugin-convert-assignment-to-arrow-function-1.2.2.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.2.2_1742837903173_0.5077382763295613"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-03-24T17:38:23.379Z","publish_time":1742837903379,"_source_registry_name":"default","_cnpm_publish_time":1742837903379},"1.2.1":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.2.1","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability convert assignment to arrow function","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-assignment-to-arrow-function#readme","main":"lib/convert-assignment-to-arrow-function.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^26.0.0","madrun":"^11.0.0"},"peerDependencies":{"putout":">=15"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-convert-assignment-to-arrow-function@1.2.1","gitHead":"a5615c6735219a7518a1bfd7c3adda98f87e9138","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.14.0","_npmVersion":"11.1.0","dist":{"shasum":"d3c8276a10dd2d87ae2d92d1f0c3736c201a5b0d","size":2137,"noattachment":false,"key":"/@putout/plugin-convert-assignment-to-arrow-function/-/@putout/plugin-convert-assignment-to-arrow-function-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-assignment-to-arrow-function/download/@putout/plugin-convert-assignment-to-arrow-function-1.2.1.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.2.1_1742837082994_0.39927189535962104"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-03-24T17:24:43.197Z","publish_time":1742837083197,"_source_registry_name":"default","_cnpm_publish_time":1742837083197},"1.2.0":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.2.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability convert assignment to arrow function","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-assignment-to-arrow-function.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"devDependencies":{"@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^7.3.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0","madrun":"^8.0.1"},"peerDependencies":{"putout":">=15"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-assignment-to-arrow-function@1.2.0","_nodeVersion":"15.11.0","_npmVersion":"7.6.0","dist":{"shasum":"8f50a6c9d9a7ec0aec1c41fe8b46b39cd264fe71","size":1884,"noattachment":false,"key":"/@putout/plugin-convert-assignment-to-arrow-function/-/@putout/plugin-convert-assignment-to-arrow-function-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-assignment-to-arrow-function/download/@putout/plugin-convert-assignment-to-arrow-function-1.2.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.2.0_1617039196128_0.3454689082578206"},"_hasShrinkwrap":false,"publish_time":1617039196408,"_cnpm_publish_time":1617039196408,"_cnpmcore_publish_time":"2021-12-16T21:05:29.279Z"},"1.1.0":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.1.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability convert assignment to arrow function","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-assignment-to-arrow-function.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"devDependencies":{"@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^7.3.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0","madrun":"^8.0.1"},"peerDependencies":{"putout":">=15"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-assignment-to-arrow-function@1.1.0","_nodeVersion":"15.11.0","_npmVersion":"7.6.0","dist":{"shasum":"32f18122eaedff3272d630dcf51c2ebd6c3a5b17","size":1888,"noattachment":false,"key":"/@putout/plugin-convert-assignment-to-arrow-function/-/@putout/plugin-convert-assignment-to-arrow-function-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-assignment-to-arrow-function/download/@putout/plugin-convert-assignment-to-arrow-function-1.1.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.1.0_1617038740905_0.1466126812852524"},"_hasShrinkwrap":false,"publish_time":1617038741045,"_cnpm_publish_time":1617038741045,"_cnpmcore_publish_time":"2021-12-16T21:05:29.508Z"},"1.0.0":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability convert assignment to arrow function","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-assignment-to-arrow-function.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"devDependencies":{"@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^7.3.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0","madrun":"^8.0.1"},"peerDependencies":{"putout":">=15"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-assignment-to-arrow-function@1.0.0","_nodeVersion":"15.10.0","_npmVersion":"7.5.3","dist":{"shasum":"3665efc06988a0c1a31c3cc1f296beeda509104b","size":1850,"noattachment":false,"key":"/@putout/plugin-convert-assignment-to-arrow-function/-/@putout/plugin-convert-assignment-to-arrow-function-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-convert-assignment-to-arrow-function/download/@putout/plugin-convert-assignment-to-arrow-function-1.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.0.0_1614519677626_0.17843223732345703"},"_hasShrinkwrap":false,"publish_time":1614519677767,"_cnpm_publish_time":1614519677767,"_cnpmcore_publish_time":"2021-12-16T21:05:29.791Z"}},"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","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/v38.5.7/packages/plugin-convert-assignment-to-arrow-function#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}