{"name":"@putout/plugin-apply-shorthand-properties","version":"7.4.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to apply shorthand properties","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-shorthand-properties#readme","main":"lib/apply-shorthand-properties.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","putout-plugin-apply","apply-shorthand-properties"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/plugin-remove-unused-variables":"*","@putout/test":"^14.0.0","c8":"^10.0.0","eslint":"v10.0.0-alpha.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-apply-shorthand-properties@7.4.0","gitHead":"9032c9a3906175ce57fc89f098d4f01f50a4c56b","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"25.2.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-lH/YBvQyDuJVvAW6vuVMiyZe4yOAPyTSeyJwZry5wAsafDAZyNF4ddyDffAVRRfJVIer41FzIp+kGOyCk2z1Ng==","shasum":"3d6526d796d16cebe8507bf3a1a700e949daf326","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-shorthand-properties/download/@putout/plugin-apply-shorthand-properties-7.4.0.tgz","fileCount":4,"unpackedSize":7597,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDBGaQz/Tq2OiBlOhpIpW/FpY/FATSmjU8JhMwuZTxt/gIgEssgBLZXAP8tprzFJe8zNg703poejbkMyIEv/bj4nas="}],"size":2755,"noattachment":false,"key":"/@putout/plugin-apply-shorthand-properties/-/@putout/plugin-apply-shorthand-properties-7.4.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-apply-shorthand-properties_7.4.0_1764266989275_0.2938896285514325"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-apply-shorthand-properties [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-shorthand-properties.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-shorthand-properties \"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to apply shorthand properties.\n\n## Install\n\n```\nnpm i @putout/plugin-apply-shorthand-properties -D\n```\n\n## Config\n\n```json\n{\n    \"rules\": {\n        \"apply-shorthand-properties\": [\"on\", {\n            \"ignore\": [],\n            \"rename\": false\n        }]\n    },\n    \"plugins\": [\n        \"apply-shorthand-properties\"\n    ]\n}\n```\n\n## With default options\n\n### ❌ Example of incorrect code\n\n```js\nimport {'b' as b} from 'b';\n\nconst {a: a} = b;\n```\n\n### ✅ Example of correct code\n\n```js\nimport {b} from 'b';\n\nconst {a} = b;\n```\n\n## When `rename` enabled\n\n### ❌ Example of incorrect code\n\n```js\nconst AUTH_SESSION = 'xx';\n\nexport const setSession = (session) => ({\n    type: AUTH_SESSION,\n    payload: session,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst type = 'xx';\n\nexport const setSession = (payload) => ({\n    type,\n    payload,\n});\n```\n\n## Comparison\n\nLinter | Rule | Fix\n--------|-------|------------|\n🐊 **Putout** | [`apply-shorthand-properties`](https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-shorthand-properties#readme) | ✅\n⏣ **ESLint** | [`no-useless-rename`](https://eslint.org/docs/rules/no-useless-rename) | ❌\n\n## License\n\nMIT\n","publish_time":1764266989470,"_cnpm_publish_time":1764266989470,"dist-tags":{"latest":"7.4.0"}}