{"name":"@putout/plugin-apply-shorthand-properties","version":"7.2.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@7.2.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"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":"e8a5f7c7b88d1a4cd6b848446b534c19cfaa4ede","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-shorthand-properties/download/@putout/plugin-apply-shorthand-properties-7.2.0.tgz","fileCount":4,"integrity":"sha512-QZBzJHPKQkCbgdfwe5gzgqukT4h75VhNsOFxs5ZiW9XEnqSNgwBrr5jAup18P2+pVMXf4GlTS/vFz9xpZ64KUA==","signatures":[{"sig":"MEUCICagBSf6S8ZEE4bX1KhjImdoGWgBwBFqB7qKeY3gwur6AiEAqFnussPtmheORl0R+piStn5dX/tlBjk92MXdACQvo5g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7115,"size":2663,"noattachment":false,"key":"/@putout/plugin-apply-shorthand-properties/-/@putout/plugin-apply-shorthand-properties-7.2.0.tgz"},"main":"lib/apply-shorthand-properties.js","type":"module","engines":{"node":">=20"},"gitHead":"2d3be5c3a0f914f318b720585a8b947db5d6fed7","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 apply shorthand properties","directories":{},"_nodeVersion":"24.11.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"v10.0.0-alpha.0","madrun":"^11.0.0","@putout/test":"^14.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0","eslint-plugin-putout":"^28.0.0","@putout/plugin-remove-unused-variables":"*"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-apply-shorthand-properties_7.2.0_1763936737385_0.16016290642929953","host":"s3://npm-registry-packages-npm-production"},"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":1763936737619,"_cnpm_publish_time":1763936737619,"dist-tags":{"latest":"7.4.0"}}