{"name":"@putout/plugin-apply-shorthand-properties","version":"6.0.0","keywords":["putout","putout-plugin","putout-plugin-apply","apply-shorthand-properties"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-apply-shorthand-properties@6.0.0","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-shorthand-properties#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"0e22b55037eeba4d101aa01560934233613d0676","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-shorthand-properties/download/@putout/plugin-apply-shorthand-properties-6.0.0.tgz","fileCount":4,"integrity":"sha512-CJEW4y/LdHj9HR0TR8LEN080uPNaywyDZUECi1rIlS5/s/xwuiC2QCvQdqpkDJE1qWn3SLlYJpdY9w6SthE02g==","signatures":[{"sig":"MEYCIQC03fe8FLv5Q6N+uCgUxI03rfPrTNsW3wXSIYRGCBR8UQIhAJ89VdLTsJ2LlWaaKmbM+T/aqeNYDuyxPEWfTFw1nlxN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6151,"size":2435,"noattachment":false,"key":"/@putout/plugin-apply-shorthand-properties/-/@putout/plugin-apply-shorthand-properties-6.0.0.tgz"},"main":"lib/apply-shorthand-properties.js","type":"module","engines":{"node":">=18"},"gitHead":"cf0d6bbb85b649ee324eed2ffa7c2efda75b825b","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":"10.9.0","description":"🐊Putout plugin adds ability to apply shorthand properties","directories":{},"_nodeVersion":"22.11.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^10.0.0","@putout/test":"^11.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^23.0.0","@putout/plugin-remove-unused-variables":"*"},"peerDependencies":{"putout":">=36"},"_npmOperationalInternal":{"tmp":"tmp/plugin-apply-shorthand-properties_6.0.0_1732728971381_0.7721742529644486","host":"s3://npm-registry-packages"},"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":1732728971580,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1732728971580,"dist-tags":{"latest":"7.4.0"}}