{"_id":"@putout/plugin-labels","_rev":"4159953","name":"@putout/plugin-labels","description":"🐊Putout plugin helps with labels","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:36:57.000Z","created":"2024-08-24T15:11:03.245Z","3.0.0":"2026-01-28T20:41:30.958Z","2.1.0":"2025-11-28T15:46:19.824Z","2.0.0":"2025-04-18T14:08:38.964Z","1.0.0":"2024-08-24T15:11:03.245Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"versions":{"3.0.0":{"name":"@putout/plugin-labels","version":"3.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin helps with labels","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-labels#readme","main":"lib/index.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"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":{"fullstore":"^4.0.0"},"keywords":["putout","putout-plugin","plugin","labels"],"devDependencies":{"@putout/test":"^15.0.0","c8":"^10.0.0","eslint":"^10.0.0-alpha.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^30.0.0","madrun":"^12.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=41"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-labels@3.0.0","gitHead":"5ec4b4b9034e4e63e6cada8c481f40840dd750fb","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"25.5.0","_npmVersion":"11.4.2","dist":{"shasum":"f210062179d87ddd6598a570b49598631422d9e8","size":3213,"noattachment":false,"key":"/@putout/plugin-labels/-/@putout/plugin-labels-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-labels/download/@putout/plugin-labels-3.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-labels_3.0.0_1769632890805_0.6254781437026351"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-28T20:41:30.958Z","publish_time":1769632890958,"_source_registry_name":"default","_cnpm_publish_time":1769632890958},"2.1.0":{"name":"@putout/plugin-labels","version":"2.1.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin helps with labels","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-labels#readme","main":"lib/index.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"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":{"fullstore":"^3.0.0"},"keywords":["putout","putout-plugin","plugin","esm","commonjs"],"devDependencies":{"@putout/test":"^14.0.0","c8":"^10.0.0","eslint":"v10.0.0-alpha.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^28.0.0","madrun":"^11.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-labels@2.1.0","gitHead":"ce22bbe235bb88066ed3a6139744d56795e2b53d","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"25.2.1","_npmVersion":"11.4.2","dist":{"shasum":"3be73cd95a7059fc71aae0ba328e67def88b39b3","size":3222,"noattachment":false,"key":"/@putout/plugin-labels/-/@putout/plugin-labels-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-labels/download/@putout/plugin-labels-2.1.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-labels_2.1.0_1764344779635_0.04391588970796434"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-11-28T15:46:19.824Z","publish_time":1764344779824,"_source_registry_name":"default","_cnpm_publish_time":1764344779824},"2.0.0":{"name":"@putout/plugin-labels","version":"2.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin helps with labels","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-labels#readme","main":"lib/index.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"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":{"fullstore":"^3.0.0"},"keywords":["putout","putout-plugin","plugin","esm","commonjs"],"devDependencies":{"@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^26.0.0","madrun":"^11.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-labels@2.0.0","gitHead":"67ba503147c23afeea67f61205c1b6bc8a4a5780","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.14.0","_npmVersion":"11.1.0","dist":{"shasum":"99b92390bce94935bfd9f0a0b43a16d59e927935","size":3147,"noattachment":false,"key":"/@putout/plugin-labels/-/@putout/plugin-labels-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-labels/download/@putout/plugin-labels-2.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-labels_2.0.0_1744985318765_0.34295797597474853"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-04-18T14:08:38.964Z","publish_time":1744985318964,"_source_registry_name":"default","_cnpm_publish_time":1744985318964},"1.0.0":{"name":"@putout/plugin-labels","version":"1.0.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin helps with labels","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-labels#readme","main":"lib/index.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"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":{"fullstore":"^3.0.0"},"keywords":["putout","putout-plugin","plugin","esm","commonjs"],"devDependencies":{"@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","lerna":"^6.0.1","madrun":"^10.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=36"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-labels@1.0.0","gitHead":"4001dcfd1299bda7235a937f86f0e27c4a9b7c4c","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.7.0","_npmVersion":"10.8.2","dist":{"shasum":"1c5d4e19c472693ced79e1230c0b23a8f23a3029","size":3078,"noattachment":false,"key":"/@putout/plugin-labels/-/@putout/plugin-labels-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-labels/download/@putout/plugin-labels-1.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-labels_1.0.0_1724512263038_0.807932102371117"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-08-24T15:11:03.245Z","publish_time":1724512263245,"_source_registry_name":"default","_cnpm_publish_time":1724512263245}},"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","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-labels#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}