{"name":"@putout/plugin-apply-shorthand-properties","version":"6.1.0","type":"commonjs","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/plugin-remove-unused-variables":"*","@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^23.0.0","madrun":"^10.0.0"},"peerDependencies":{"putout":">=36"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-apply-shorthand-properties@6.1.0","gitHead":"0058ab1496ba79ce4734b98aa8fdf85453a6eea7","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-zM/5nRFqkVssDrK7fsPQLngkK+QO8vvn1hlPA4bg8Nyjt1arAaLUZEv8vjrVWtofzAsTjyE74fW4cbnG+lBm5Q==","shasum":"b1ec9203b4c850e1ee529ef41742c11ef93250cb","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-shorthand-properties/download/@putout/plugin-apply-shorthand-properties-6.1.0.tgz","fileCount":4,"unpackedSize":6535,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcve07LcPce43QbEpQjIGEhAlVaax0CtbffhHiCVbq9wIgGOBDGhDM8y4hr6dNuioJYVz+YjG8AjZmLD2j7ifCmF0="}],"size":2557,"noattachment":false,"key":"/@putout/plugin-apply-shorthand-properties/-/@putout/plugin-apply-shorthand-properties-6.1.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-apply-shorthand-properties_6.1.0_1732823952478_0.2249267895177367"},"_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":1732823952676,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1732823952676,"dist-tags":{"latest":"7.4.0"}}