{"name":"@putout/plugin-convert-to-arrow-function","version":"5.0.1","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to convert anonymous to arrow function","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-to-arrow-function#readme","main":"lib/convert-to-arrow-function.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"publishOnly":"madrun publishOnly","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","plugin","spread","array","from"],"devDependencies":{"@putout/eslint-flat":"^4.0.0","@putout/test":"^15.0.0","c8":"^10.0.0","eslint":"^10.0.0-alpha.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^30.0.0","madrun":"^12.0.0"},"peerDependencies":{"putout":">=41"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-convert-to-arrow-function@5.0.1","gitHead":"2f4e5df8e4337c5a15add2a3c5114dc778ecb8ee","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"25.5.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-G1yzA3Vo/e1mSwPP77zUpjZ15gO5uVTM9syxJFAWv+1YUlFyr5zDrnbZAH45J8muC+ieGn0PWU5BJWoj0Y9/lQ==","shasum":"d509def59d254c57c790eb064aa2389a96a0fd51","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-to-arrow-function/download/@putout/plugin-convert-to-arrow-function-5.0.1.tgz","fileCount":4,"unpackedSize":4924,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICxraqn7d5T2swPwVq5pfpNbkA6ndN5LRTMGz4NdpeFNAiEA3sGoGFDpqyucgf+bo0dCm8/XwN0Qk4gZPuGg+q+AlVo="}],"size":2233,"noattachment":false,"key":"/@putout/plugin-convert-to-arrow-function/-/@putout/plugin-convert-to-arrow-function-5.0.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-to-arrow-function_5.0.1_1769633167614_0.5109771190533354"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-convert-to-arrow-function [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-to-arrow-function.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-to-arrow-function \"npm\"\n\n> An **arrow function** expression is a compact alternative to **anonymous function**.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin convert **anonymous** to **arrow function**.\n\n## Install\n\n```\nnpm i @putout/plugin-convert-to-arrow-function\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-to-arrow-function\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nmodule.exports = function(a, b) {};\n\nfunction x() {\n    return function(a) {\n        return b;\n    };\n}\n\ncall(function() {\n    return 'world';\n});\n```\n\n## ✅ Example of correct code\n\n```js\nmodule.exports = (a, b) => {};\n\nfunction x() {\n    return (a) => {\n        return b;\n    };\n}\n\ncall(() => {\n    return 'world';\n});\n```\n\n## Comparison\n\nLinter | Rule | Fix\n--------|-------|------------|\n🐊 **Putout** | [`convert-to-arrow-function`](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-to-arrow-function#readme) | ✅\n⏣ **ESLint** | [`prefer-arrow-callback`](https://eslint.org/docs/latest/rules/prefer-arrow-callback) | ✅\n\n## License\n\nMIT\n","publish_time":1769633167744,"_cnpm_publish_time":1769633167744,"dist-tags":{"latest":"5.0.1"}}