{"name":"@putout/plugin-convert-to-arrow-function","version":"5.0.0","keywords":["putout","putout-plugin","plugin","spread","array","from"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-convert-to-arrow-function@5.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-to-arrow-function#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"7122cfd7b270097ddd48a460d63b497fc8f16685","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-to-arrow-function/download/@putout/plugin-convert-to-arrow-function-5.0.0.tgz","fileCount":4,"integrity":"sha512-wsz7bOX+JmmaqCurV0kXDz3JLIlLkS8f91JSk0KXKEJh/R1kDmP2nB889xNPM+WAQnLUYYWcceZ28+Wt0RpNlA==","signatures":[{"sig":"MEYCIQD/FzJn80fpRGTCnsRrLQwoVNbwvpocgIczObCpuR8zBAIhALTO1/hDfBcWhNFKdGVd6S25YZWPYgmCQSP/kPIaCezt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4924,"size":2231,"noattachment":false,"key":"/@putout/plugin-convert-to-arrow-function/-/@putout/plugin-convert-to-arrow-function-5.0.0.tgz"},"main":"lib/convert-to-arrow-function.js","type":"module","engines":{"node":">=16"},"gitHead":"73e8f8e77b4ea101f66a1f8a8d86fd77c2560d91","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","publishOnly":"madrun publishOnly"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.4.2","description":"🐊Putout plugin adds ability to convert anonymous to arrow function","directories":{},"_nodeVersion":"25.5.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^10.0.0-alpha.0","madrun":"^12.0.0","@putout/test":"^15.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^4.0.0","eslint-plugin-putout":"^30.0.0"},"peerDependencies":{"putout":">=29"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-to-arrow-function_5.0.0_1769632978546_0.3574527271326917","host":"s3://npm-registry-packages-npm-production"},"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":1769632978704,"_cnpm_publish_time":1769632978704,"dist-tags":{"latest":"5.0.1"}}