{"name":"@putout/plugin-extract-sequence-expressions","version":"4.1.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to extract sequence expressions","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-extract-sequence-expressions#readme","main":"lib/extract-sequence-expressions.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","plugin","remove","only"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/test":"^14.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^28.0.0","madrun":"^11.0.0"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-extract-sequence-expressions@4.1.0","gitHead":"4bb24ad09418aba1659c02768c6917188095d376","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"24.6.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-C8JzMu3diUnbM4m0C8E0xBx+P41rbe8hJZpnW/xLGdVL5EGG5z/2bbeWVvAMMDOcgm1TEw/aiBi/CsrOHEndUA==","shasum":"183cf92b43618050b7ff750bec6fec1c21e65331","tarball":"http://registry-npm.ywwl.com/@putout/plugin-extract-sequence-expressions/download/@putout/plugin-extract-sequence-expressions-4.1.0.tgz","fileCount":4,"unpackedSize":7571,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDrounfYYgI12rVTOMRXrAIOmsphKt0SomzKSxDNLbtCAIgd1BwQ3i7R2BcaY20xvtiD7KrOITxHSlbzoQ2Jz0i02A="}],"size":3026,"noattachment":false,"key":"/@putout/plugin-extract-sequence-expressions/-/@putout/plugin-extract-sequence-expressions-4.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-npm-production","tmp":"tmp/plugin-extract-sequence-expressions_4.1.0_1757019450822_0.10360423142192476"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-extract-sequence-expressions [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-extract-sequence-expressions.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-extract-sequence-expressions\"npm\"\n\n> The comma operator (`,`) evaluates each of its operands (from left to right) and returns the value of the last operand. This lets you create a compound expression in which multiple expressions are evaluated, with the compound expression's final value being the value of the rightmost of its member expressions.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to extract **sequence expressions**. Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/785d072fc20d0a3854f6ced093918b06/483b359357ebc04232f4a321bd3db627dc6a15cb).\n\n☝️*Remember, when you [writing a transform](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#readme) you can skip all parts related to **extracting sequence expressions** and just reuse current **plugin** it will make your code simpler and less error prone.*\n\n## Install\n\n```\nnpm i @putout/plugin-extract-sequence-expressions -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"extract-sequence-expressions\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\n(module.exports.x = 1, module.exports.y = 2);\n\nfn((a, b));\n(fn(a), 'hello');\n\n(fn(a), b = 3);\n(fn(a), fn(b));\n\nif ((a, b, c)) {}\n```\n\n## ✅ Example of correct code\n\n```js\nmodule.exports.x = 1;\nmodule.exports.y = 2;\n\nfn(a, b);\nfn(a, 'hello');\n\nfn(a);\nb = 3;\n\nfn(a);\nfn(b);\n\na;\nb;\n\nif (c) {}\n```\n\n## Comparison\n\nLinter | Rule | Fix\n--------|-------|------------|\n🐊 **Putout**| [`extract-sequence-expressions`](https://github.com/coderaiser/putout/tree/master/packages/plugin-extract-sequence-expressions#readme)| ✅\n⏣ **ESLint** | [`no-sequences`](https://eslint.org/docs/rules/no-sequences) | ❌\n\n## License\n\nMIT\n","publish_time":1757019451002,"_cnpm_publish_time":1757019451002,"dist-tags":{"latest":"4.1.0"}}