{"name":"@putout/plugin-labels","version":"2.1.0","keywords":["putout","putout-plugin","plugin","esm","commonjs"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-labels@2.1.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-labels#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"3be73cd95a7059fc71aae0ba328e67def88b39b3","tarball":"http://registry-npm.ywwl.com/@putout/plugin-labels/download/@putout/plugin-labels-2.1.0.tgz","fileCount":6,"integrity":"sha512-tuRK3N2AN12H8k6Zph6WsXDpzDWyXSWedoR03sslIB/5/UpqUTnzeRvn+kD2sKyUahselqAVQPWq2+ZsvYX4tQ==","signatures":[{"sig":"MEUCIQC1GL5c/AOpOYzxDHlTFWbR7rIu1glg/pJIM3qzZsSqjQIgAQOUb9O9n+tlZ1XKqtZEfN75HTtAtwQpEQHqLjy7ArU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7810,"size":3222,"noattachment":false,"key":"/@putout/plugin-labels/-/@putout/plugin-labels-2.1.0.tgz"},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"gitHead":"ce22bbe235bb88066ed3a6139744d56795e2b53d","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"},"_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 helps with labels","directories":{},"_nodeVersion":"25.2.1","dependencies":{"fullstore":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"v10.0.0-alpha.0","madrun":"^11.0.0","nodemon":"^3.0.1","@putout/test":"^14.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^28.0.0"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-labels_2.1.0_1764344779635_0.04391588970796434","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-labels [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-labels.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-labels \"npm\"\n\n> A **labeled statement** is any `statement` that is prefixed with an `identifier`. You can jump to this label using a `break` or `continue` statement nested within the labeled statement.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove unused `label` statement.\n\n## Install\n\n```\nnpm i @putout/plugin-labels -D\n```\n\n## Rules\n\n- ✅ [add-missing-async](#add-missing-async);\n- ✅ [remove-unused](#remove-unused);\n\n## Config\n\n```json\n{\n    \"rules\": {\n        \"labels/convert-to-object\": \"on\",\n        \"labels/remove-unused\": \"on\"\n    }\n}\n```\n\n☝️ If you want to override any of it, update `.putout.json` in the directory near your files.\n\n[🦉 Configuration](https://github.com/coderaiser/putout#-configuration) section of 🐊**Putout** documentation tell you more about all configuration options supported.\n\n## convert-to-object\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/86e2915cc2cffb6c26dd3bc2f2379a71/605562cf1fdf77a7918792955601e6767a805050).\n\n### ❌ Example of incorrect code\n\n```js\nconst a = () => {\n    hello: 'world';\n    x: 'm';\n};\n```\n\n### ✅ Example of correct code\n\n```js\nconst a = () => ({\n    hello: 'world',\n    x: 'm',\n});\n```\n\n## remove-unused\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/021bf8fa6f01bcc265cebbaa19d5dffc/1833eaee02119cf1d38974157a8d010ecaed7b33).\n\n### ❌ Example of incorrect code\n\n```js\nhello: while (true) {\n    break;\n}\n```\n\n### ✅ Example of correct code\n\n```js\nwhile (true) {\n    break;\n}\n```\n\n### Comparison\n\n| Linter        | Rule                                                                                                                   | Fix |\n|---------------|------------------------------------------------------------------------------------------------------------------------|-----|\n| 🐊 **Putout** | [`remove-unused-labels`](https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-unused-labels#readme) | ✅   |\n| ⏣ **ESLint**  | [`no-unused-labels`](https://eslint.org/docs/rules/no-unused-labels)                                                   | ❌   |\n| 🦕 **Deno**   | [`no-unused-labels`](https://lint.deno.land/rules/no-unused-labels)                                                    | ❌   |\n\n## License\n\nMIT\n","publish_time":1764344779824,"_cnpm_publish_time":1764344779824,"dist-tags":{"latest":"3.0.0"}}