{"name":"@putout/plugin-apply-shorthand-properties","version":"6.0.1","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.1","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":"6fcda991cd0c77d90f13f7ef73caaf3c768a57a7","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-shorthand-properties/download/@putout/plugin-apply-shorthand-properties-6.0.1.tgz","fileCount":4,"integrity":"sha512-pGkLkOeybKABlG1NU8LcY2Q6dJ6KAjkaC4H+fjkMhrBvlnZXuKJTnpKGs19KdFgbepeWVTNnrwnVnJHjXlTq+w==","signatures":[{"sig":"MEUCIH6iKi9UyijPzk7jo/asRIRdLa9axicAsPRD1Ji+yG6iAiEAuxPAVTfBPSBzpoaiQ6NKvNi8YyFkfhob74MWVpoZdk4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6178,"size":2461,"noattachment":false,"key":"/@putout/plugin-apply-shorthand-properties/-/@putout/plugin-apply-shorthand-properties-6.0.1.tgz"},"main":"lib/apply-shorthand-properties.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"26b9b14abe9cdaba7a84a0def19792c9e1a013de","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.1_1732729559100_0.5809258862949329","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":1732729559253,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1732729559253,"dist-tags":{"latest":"7.4.0"}}