{"name":"@putout/plugin-putout","version":"26.13.0","keywords":["putout","putout-plugin","plugin"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-putout@26.13.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-putout#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"255042bc01e2c5d27d829976264553b4a82fe538","tarball":"http://registry-npm.ywwl.com/@putout/plugin-putout/download/@putout/plugin-putout-26.13.0.tgz","fileCount":86,"integrity":"sha512-rFJJFyllhOkaMHBp+SPt9D1GuOARD2QKlS5rG2eRkMZLAGxf5s+5RIicY3XkMtSs4qwm8HNKSnzmTsT6luq0vg==","signatures":[{"sig":"MEUCICsmPLwV7Q7zNQztAOhbxrtV7xEDCtJTf73cL3JvySeqAiEAiedcRMfTJ3neZXWjof6QFLTRFYzKqzWtMhEjaWkdz90=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":206031,"size":37742,"noattachment":false,"key":"/@putout/plugin-putout/-/@putout/plugin-putout-26.13.0.tgz"},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"exports":{".":"./lib/index.js","./declare/types":"./lib/declare/types.js"},"gitHead":"edaf7d5ca6aa427ad4ae96a41223e9d5e22f01f0","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","wisdom":"madrun wisdom","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test","create:declare":"madrun create:declare","create:declare:types":"madrun create:declare:types"},"_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 plugins development","directories":{},"_nodeVersion":"24.6.0","dependencies":{"fullstore":"^3.0.0","try-catch":"^3.0.0","just-camel-case":"^6.2.0","just-kebab-case":"^4.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^11.0.0","montag":"^1.2.1","nodemon":"^3.0.1","supertape":"^11.0.3","@putout/test":"^14.0.0","eslint-plugin-n":"^17.0.0","@putout/plugin-esm":"*","@putout/eslint-flat":"^3.0.0","@putout/plugin-tape":"*","eslint-plugin-putout":"^28.0.0","@putout/plugin-nodejs":"*","@putout/plugin-merge-destructuring-properties":"*"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-putout_26.13.0_1757155458057_0.38058062230117207","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-putout [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-putout.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-putout \"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin helps with plugins development.\n\n## Install\n\n```\nnpm i @putout/plugin-putout -D\n```\n\n## Rules\n\n- ✅ [apply-type-check](#apply-type-check);\n- ✅ [add-await-to-progress](#add-await-to-progress);\n- ✅ [add-crawl-file](#add-crawl-file);\n- ✅ [add-path-arg-to-filter](#add-path-arg-to-filter);\n- ✅ [add-path-arg-to-fix](#add-path-arg-to-fix);\n- ✅ [add-path-arg-to-match](#add-path-arg-to-match);\n- ✅ [add-path-arg-to-visitors](#add-path-arg-to-visitors);\n- ✅ [add-places-to-compare-places](#add-places-to-compare-places);\n- ✅ [add-push-arg](#add-push-arg);\n- ✅ [add-test-args](#add-test-args);\n- ✅ [add-track-file](#add-track-file);\n- ✅ [add-traverse-args](#add-traverse-args);\n- ✅ [apply-async-formatter](#apply-async-formatter);\n- ✅ [apply-create-nested-directory](#apply-create-nested-directory);\n- ✅ [apply-create-test](#apply-create-test);\n- ✅ [apply-declare](#apply-declare);\n- ✅ [apply-destructuring](#apply-destructuring);\n- ✅ [apply-destructuring-to-options](#apply-destructuring);\n- ✅ [apply-engine-node-version](#apply-engine-node-version);\n- ✅ [apply-exports](#apply-exports);\n- ✅ [apply-exports-to-add-args](#apply-exports-to-add-args);\n- ✅ [apply-exports-to-match-files](#apply-exports-to-match-files);\n- ✅ [apply-exports-to-rename-files](#apply-exports-to-rename-files);\n- ✅ [apply-fixture-name-to-message](#apply-fixture-name-to-message);\n- ✅ [apply-for-of-to-track-file](#apply-for-of-to-track-file);\n- ✅ [apply-get-binding](#apply-get-binding);\n- ✅ [apply-insert-after](#apply-insert-after);\n- ✅ [apply-insert-before](#apply-insert-before);\n- ✅ [apply-lowercase-to-node-builders](#apply-lowercase-to-node-builders);\n- ✅ [apply-name-to-is-identifier](#apply-name-to-is-identifier);\n- ✅ [apply-namespace-specifier](#apply-namespace-specifier);\n- ✅ [apply-parens](#apply-parens);\n- ✅ [apply-processors-destructuring](#apply-processors-destructuring);\n- ✅ [apply-remove](#apply-remove);\n- ✅ [apply-rename](#apply-rename);\n- ✅ [apply-report](#apply-report);\n- ✅ [apply-short-processors](#apply-short-processors);\n- ✅ [apply-string-to-property-key](#apply-string-to-property-key);\n- ✅ [apply-transform-with-options](#apply-transform-with-options);\n- ✅ [apply-traverser-to-ignore](#apply-traverser-to-ignore);\n- ✅ [apply-vars](#apply-vars);\n- ✅ [check-declare](#check-declare);\n- ✅ [check-match](#check-match);\n- ✅ [check-replace-code](#check-replace-code);\n- ✅ [convert-add-argument-to-add-args](#convert-add-argument-to-add-test-args);\n- ✅ [convert-babel-types](#convert-babel-types);\n- ✅ [convert-destructuring-to-identifier](#convert-destructuring-to-identifier);\n- ✅ [convert-dirname-to-url](#convert-dirname-to-url);\n- ✅ [convert-find-to-traverse](#convert-find-to-traverse);\n- ✅ [convert-get-file-content-to-read-file-content](#convert-get-file-content-to-read-file-content);\n- ✅ [convert-get-rule-to-require](#convert-get-rule-to-require);\n- ✅ [convert-include-to-traverse](#convert-include-to-traverse);\n- ✅ [convert-match-to-function](#convert-match-to-function);\n- ✅ [convert-method-to-property](#convert-method-to-property);\n- ✅ [convert-node-to-path-in-get-template-values](#convert-node-to-path-in-get-template-values);\n- ✅ [convert-number-to-numeric](#convert-number-to-numeric);\n- ✅ [convert-plugins-element-to-tuple](#convert-plugins-element-to-tuple);\n- ✅ [convert-process-to-find](#convert-process-to-find);\n- ✅ [convert-progress-to-track-file](#convert-progress-to-track-file);\n- ✅ [convert-push-object-to-push-path](#convert-push-object-to-push-path);\n- ✅ [convert-putout-test-to-create-test](#convert-putout-test-to-create-test);\n- ✅ [convert-replace-to-function](#convert-replace-to-function);\n- ✅ [convert-replace-to-traverse](#convert-replace-to-traverse);\n- ✅ [convert-replace-with](#convert-replace-with);\n- ✅ [convert-replace-with-multiple](#convert-replace-with-multiple);\n- ✅ [convert-report-to-function](#convert-report-to-function);\n- ✅ [convert-to-no-transform-code](#convert-to-no-transform-code);\n- ✅ [convert-traverse-to-include](#convert-traverse-to-include);\n- ✅ [convert-traverse-to-replace](#convert-traverse-to-replace);\n- ✅ [convert-traverse-to-scan](#convert-traverse-to-scan);\n- ✅ [convert-traverse-to-super-traverse](#convert-traverse-to-super-traverse);\n- ✅ [convert-url-to-dirname](#convert-url-to-dirname);\n- ✅ [create-test](#create-test);\n- ✅ [convert-replacer-to-includer](#convert-replacer-to-includer);\n- ✅ [declare](#declare);\n- ✅ [declare-path-variable](#declare-path-variable);\n- ✅ [declare-template-variables](#declare-template-variables);\n- ✅ [includer](#includer);\n- ✅ [move-require-on-top-level](#move-require-on-top-level);\n- ✅ [remove-empty-array-from-process](#remove-empty-array-from-process);\n- ✅ [remove-empty-object-from-transform](#remove-empty-object-from-transform);\n- ✅ [remove-message-from-no-report-after-transform](#remove-message-from-no-report-after-transform);\n- ✅ [remove-unused-get-properties-argument](#remove-unused-get-properties-argument);\n- ✅ [remove-useless-printer-option](#remove-useless-printer-option);\n- ✅ [remove-useless-source-argument](#remove-useless-source-argument);\n- ✅ [rename-operate-to-operator](#rename-operate-to-operator);\n- ✅ [replace-operate-with-operator](#replace-operate-with-operator);\n- ✅ [replace-test-message](#replace-test-message);\n- ✅ [remove-useless-match](#remove-useless-match);\n- ✅ [remove-useless-type-check-declaration](#remove-useless-type-check-declaration);\n- ✅ [shorten-imports](#shorten-imports);\n- ✅ [simplify-replace-template](#simplify-replace-template);\n- ✅ [shorten-path-get](#shorten-path-get);\n\n## File rules\n\n- ✅ [sort-readme-file](#sort-readme-file);\n\n## Config\n\n```json\n{\n    \"rules\": {\n        \"putout/add-await-to-progress\": \"on\",\n        \"putout/add-crawl-file\": \"on\",\n        \"putout/add-path-arg-to-filter\": \"on\",\n        \"putout/add-path-arg-to-fix\": \"on\",\n        \"putout/add-path-arg-to-match\": \"on\",\n        \"putout/add-path-arg-to-visitors\": \"on\",\n        \"putout/add-places-to-compare-places\": \"on\",\n        \"putout/add-push-arg\": \"on\",\n        \"putout/add-test-args\": \"on\",\n        \"putout/add-track-file\": \"on\",\n        \"putout/add-traverse-args\": \"on\",\n        \"putout/apply-async-formatter\": \"on\",\n        \"putout/apply-create-nested-directory\": \"on\",\n        \"putout/apply-create-test\": \"on\",\n        \"putout/apply-declare\": \"on\",\n        \"putout/apply-destructuring\": \"on\",\n        \"putout/apply-destructuring-to-options\": \"on\",\n        \"putout/apply-engine-node-version\": \"off\",\n        \"putout/apply-exports\": \"off\",\n        \"putout/apply-exports-to-add-args\": \"on\",\n        \"putout/apply-exports-to-match-files\": \"on\",\n        \"putout/apply-exports-to-rename-files\": \"on\",\n        \"putout/apply-fixture-name-to-message\": \"on\",\n        \"putout/apply-for-of-to-track-file\": \"on\",\n        \"putout/apply-get-binding\": \"on\",\n        \"putout/apply-insert-after\": \"on\",\n        \"putout/apply-insert-before\": \"on\",\n        \"putout/apply-lowercase-to-node-builders\": \"on\",\n        \"putout/apply-name-to-is-identifier\": \"on\",\n        \"putout/apply-namespace-specifier\": \"on\",\n        \"putout/apply-parens\": \"on\",\n        \"putout/apply-processors-destructuring\": \"on\",\n        \"putout/apply-remove\": \"on\",\n        \"putout/apply-rename\": \"on\",\n        \"putout/apply-report\": \"on\",\n        \"putout/apply-short-processors\": \"on\",\n        \"putout/apply-string-to-property-key\": \"on\",\n        \"putout/apply-transform-with-options\": \"on\",\n        \"putout/apply-traverser-to-ignore\": \"on\",\n        \"putout/apply-type-check\": \"on\",\n        \"putout/apply-vars\": \"on\",\n        \"putout/check-declare\": \"on\",\n        \"putout/check-match\": \"on\",\n        \"putout/check-replace-code\": [\"on\", {\n            \"once\": true\n        }],\n        \"putout/convert-add-argument-to-add-args\": \"on\",\n        \"putout/convert-babel-types\": \"on\",\n        \"putout/convert-destructuring-to-identifier\": \"on\",\n        \"putout/convert-dirname-to-url\": \"on\",\n        \"putout/convert-get-file-content-to-read-file-content\": \"on\",\n        \"putout/convert-get-rule-to-require\": \"on\",\n        \"putout/convert-include-to-traverse\": \"on\",\n        \"putout/convert-match-to-function\": \"on\",\n        \"putout/convert-method-to-property\": \"on\",\n        \"putout/convert-node-to-path-in-get-template-values\": \"on\",\n        \"putout/convert-number-to-numeric\": \"on\",\n        \"putout/convert-plugins-element-to-tuple\": \"on\",\n        \"putout/convert-process-to-find\": \"on\",\n        \"putout/convert-progress-to-track-file\": \"on\",\n        \"putout/convert-push-object-to-push-path\": \"on\",\n        \"putout/convert-putout-test-to-create-test\": \"on\",\n        \"putout/convert-replace-to-function\": \"on\",\n        \"putout/convert-replace-to-traverse\": \"on\",\n        \"putout/convert-replace-with\": \"on\",\n        \"putout/convert-replace-with-multiple\": \"on\",\n        \"putout/convert-report-to-function\": \"on\",\n        \"putout/convert-to-no-transform-code\": \"on\",\n        \"putout/convert-traverse-to-include\": \"on\",\n        \"putout/convert-traverse-to-replace\": \"on\",\n        \"putout/convert-traverse-to-scan\": \"on\",\n        \"putout/convert-traverse-to-super-traverse\": \"on\",\n        \"putout/convert-url-to-dirname\": \"on\",\n        \"putout/create-test\": \"on\",\n        \"putout/declare\": \"on\",\n        \"putout/declare-path-variable\": \"on\",\n        \"putout/declare-template-variables\": \"on\",\n        \"putout/includer\": \"on\",\n        \"putout/move-require-on-top-level\": \"on\",\n        \"putout/remove-empty-array-from-process\": \"on\",\n        \"putout/remove-empty-object-from-transform\": \"on\",\n        \"putout/remove-message-from-no-report-after-transform\": \"on\",\n        \"putout/remove-unused-get-properties-argument\": \"on\",\n        \"putout/remove-useless-printer-option\": \"on\",\n        \"putout/remove-useless-source-argument\": \"on\",\n        \"putout/replace-test-message\": \"on\",\n        \"putout/shorten-imports\": \"on\",\n        \"putout/simplify-replace-template\": \"on\",\n        \"putout/sort-readme-file\": \"on\",\n        \"putout/convert-replacer-to-includer\": \"on\",\n        \"putout/remove-useless-match\": \"on\",\n        \"putout/remove-useless-type-check-declaration\": \"on\",\n        \"putout/shorten-path-get\": \"on\"\n    }\n}\n```\n\n## add-await-to-progress\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/978d70945edfa369390ea059654ff04d/89225c04039b9c0e9057aad34852c9428264f119).\n\n### ❌ Example of incorrect code\n\n```js\nconst {replaceWith} = require('putout').operator;\n\nmodule.exports.fix = (path) => {\n    replaceWith(path, identifier('hello'));\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.fix = (path) => {\n    path.replaceWithMultiple([\n        identifier('hello'),\n    ]);\n};\n```\n\n## add-crawl-file\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/4faf27234e9c5616444d0cabd79f00be/aac768e7150635d96cd71507e4a6eb43d0899814).\n\n### ❌ Example of incorrect code\n\n```js\nconst {replaceWithMultiple} = require('putout').operator;\n\nmodule.exports.fix = (path) => {\n    replaceWithMultiple(path, [\n        identifier('hello'),\n    ]);\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.replace = {\n    'let __a = __b': 'const __b = __a',\n};\n```\n\n## add-path-arg-to-filter\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/00a5e23e6a1a708937ef3fae2a792f86/c2fc350831f777bbb383fb65216b349edd4ec53d).\n\n### ❌ Example of incorrect code\n\n```js\ncreateTest(__dirname, {\n    printer: 'putout',\n    plugins: [\n        ['putout/create-test', plugin],\n    ],\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst {isNumberLiteral} = types;\nisNumberLiteral(node);\n```\n\n## add-path-arg-to-fix\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/3d3fb6b8f5e5376cdd1674c9b19e0e27/4872f77e680a2fc443618f4bf5fae3ffab11046a).\n\n### ❌ Example of incorrect code\n\n```js\n__putout_processor_json({\n    rules: {\n        'putout/create-test': ['on', {\n            add: [\n                ['printer', 'putout'],\n            ],\n        }],\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\ncreateTest(__dirname, {\n    'putout/create-test': plugin,\n});\n```\n\n## add-path-arg-to-match\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/35189d0e47c6ad1ca369e5a9287a34c1/d5fa7513a44fecc86beabd1faa8542bee7bc3e5e).\n\n### ❌ Example of incorrect code\n\n```js\nconst {isNumericLiteral} = types;\nisNumericLiteral(node);\n```\n\n### ✅ Example of correct code\n\n```js\nimport putoutTest from '@putout/test';\n\nconst test = putoutTest(__dirname, {\n    'remove-unused-variables': rmVars,\n});\n```\n\n## add-path-arg-to-visitors\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/e20eb16668b2ebbceca1a03cde859e93/fee08d6dbb6aa4d835adacc8e9de4d994fd34848).\n\n### ❌ Example of incorrect code\n\n```js\nimport {createTest} from '@putout/test';\n\nconst test = createTest(__dirname, {\n    'remove-unused-variables': rmVars,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nt.transform('nested-not-block', [\n    ['convert-if-to-jmp', convertIfToJmp],\n    convertDoWhileToJnz,\n]);\n```\n\n## add-push-arg\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/cae7b14fa6be0fe50b134839bea1e544/37f9d161146dbe4f0497f852ba54161a759f7cbd).\n\n### ❌ Example of incorrect code\n\n```js\nt.transform('nested-not-block', [\n    ['convert-if-to-jmp', convertIfToJmp],\n    ['convert-do-while-to-jnz', convertDoWhileToJnz],\n]);\n```\n\n### ✅ Example of correct code\n\n```js\nexport const fix = ({path}) => {\n    removeClassName(path, SELECTED);\n};\npush({\n    path: child,\n});\n```\n\n## add-test-args\n\n### ❌ Example of incorrect code\n\n```js\nexport const fix = (path) => {\n    removeClassName(path, SELECTED);\n};\npush(child);\n```\n\n### ✅ Example of correct code\n\n```js\ntest('plugin-apply-destructuring: transform: array: destructuring', (t) => {\n    const code = 'const {name} = array[0]';\n    \n    t.transform(code, '');\n    t.end();\n});\n```\n\n## add-track-file\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/faaba1ce41e6fd274bc82a8875a52bfa/b34a22fdf9080e6b2f06703760f629d83d69ff3d).\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.replace = () => ({\n    'let __a = __b': 'const __b = __a',\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const fix = () => {};\nexport const replace = () => ({\n    [__json]: (path) => {\n        const __aPath = path.get('arguments.0');\n        const {importsPath} = getProperties(__aPath, ['imports']);\n    },\n});\n```\n\n## add-traverse-args\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/b453bd78b8e9380da8b2f33dfb38b4e2/53b14f89eb88aa10c8e00ba1f0251976592e14ee).\nSupported args:\n\n- `push`:\n\n### ❌ Example of incorrect code\n\n```js\ntest('plugin-apply-destructuring: transform: array: destructuring', (t) => {\n    const code = 'const {name} = array[0]';\n    \n    t.noTransformCode(code);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.fix = (path) => {\n    path.replaceWith(identifier('hello'));\n};\n```\n\n## apply-async-formatter\n\n### ❌ Example of incorrect code\n\n```js\ntest('formatter: codeframea', (t) => {\n    t.format(codeframe, 1);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('formatter: codeframea', async ({format}) => {\n    await format(codeframe, 1);\n});\n```\n\n## apply-create-nested-directory\n\nCheckout in [**Putout Editor**](https://putout.cloudcmd.io/#/gist/d97578b334963b2f573d1980a61034de/0b876a781268916344fa0ed4c19bdbc9fd7bbc3f).\n\n### ❌ Example of incorrect code\n\n```js\nconst dirPath = createDirectory(path, '/hello/world');\nconst dirPath2 = createNestedDirectory(path, 'world');\n```\n\n### ✅ Example of correct code\n\n```js\nconst dirPath = createNestedDirectory(path, '/hello/world');\nconst dirPath2 = createDirectory(path, 'world');\n```\n\n## apply-create-test\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('@putout/test')({\n    'remove-debugger': plugin,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst {createTest} = require('@putout/test');\nconst test = createTest({\n    'remove-debugger': plugin,\n});\n```\n\n## apply-declare\n\nBetter to use [`Declareator`](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#declarator) instead of `operator.declare()`.\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/cf35de5e80e8f7aad866358a50c5eded/0af6142fc9c9e71ac2a2aa96cb85613dd95c9fbf).\n\n### ❌ Example of incorrect code\n\n```js\nconst {operator} = require('putout');\nconst {declare} = operator;\n\nmodule.exports = declare({\n    tryCatch: `import tryCatch from 'try-catch'`,\n    tryToCatch: `import tryToCatch from 'try-to-catch'`,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.declare = () => ({\n    tryCatch: `import tryCatch from 'try-catch'`,\n    tryToCatch: `import tryToCatch from 'try-to-catch'`,\n});\n```\n\n## apply-destructuring\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/16fb7b414f23b9ed81bef4f5275d921e/e12e3a7c57868e623b2c11d19de1adbf1f5e3569).\n\n### ❌ Example of incorrect code\n\n```js\nconst putout = require('putout');\n```\n\n### ✅ Example of correct code\n\n```js\nconst {putout} = require('putout');\n```\n\n## apply-destructuring-to-options\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/44f02be3d5b1fcef7dec27edf7bb0016/75e4443ff82350af1b85106af87e488dba1cf178).\n\n### ❌ Example of incorrect code\n\n```js\nexport const filter = (path, options) => {};\n```\n\n### ✅ Example of correct code\n\n```js\nexport const filter = (path, {options}) => {};\n```\n\n## apply-engine-node-version\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/7ed4860732476de489ae149c7f09e2fe/d8b6e131596c0888ec8b99d4728cd999b17165c9).\n\n```diff\n{\n    \"name\": \"@putout/plugin-variables\",\n    \"peerDependencies\": {\n        \"putout\": \">=41\"\n    },\n    \"license\": \"MIT\",\n    \"engines\": {\n-       \"node\": \">=20\"\n+       \"node\": \">=22\"\n    }\n}\n```\n\n## apply-exports\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/cf35de5e80e8f7aad866358a50c5eded/0af6142fc9c9e71ac2a2aa96cb85613dd95c9fbf).\nPossible configuration:\n\n```json\n{\n    \"rules\": {\n        \"putout/apply-exports\": [\"on\", {\n            \"addArgs\": [\n                \"report\",\n                \"fix\",\n                \"scan\"\n            ]\n        }]\n    }\n}\n```\n\n### ❌ Example of incorrect code\n\n```js\nexport default createRenameProperty([\n    ...v32,\n    ...v29,\n]);\n```\n\n### ✅ Example of correct code\n\n```js\nexport const {\n    report,\n    fix,\n    scan,\n} = createRenameProperty([\n    ...v32,\n    ...v29,\n]);\n```\n\n## apply-exports-to-add-args\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/cf35de5e80e8f7aad866358a50c5eded/0af6142fc9c9e71ac2a2aa96cb85613dd95c9fbf).\n\n### ❌ Example of incorrect code\n\n```js\nexport default addArgs(__args);\n```\n\n### ✅ Example of correct code\n\n```js\nexport const {\n    report,\n    fix,\n    traverse,\n} = addArgs(__args);\n```\n\n## apply-exports-to-match-files\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/d40ac85b974249c51f9874919468fd30/4194c9b21d065bd1359ffc7298aaeb1835fbbb48).\n\n### ❌ Example of incorrect code\n\n```js\nexport default matchFiles({\n    '*.cjs': plugin,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const {\n    report,\n    fix,\n    scan,\n} = matchFiles({\n    '*.cjs': plugin,\n});\n```\n\n## apply-exports-to-rename-files\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/999f7a582825fa88691ba87324365f3f/c679723b7ff2159d738ab7681f8c7c6460dd4326).\n\n### ❌ Example of incorrect code\n\n```js\nexport default renameFiles({\n    type: 'module',\n    mask: '*.mjs',\n    rename(name) {\n        return name.replace(/mjs$/, 'js');\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const {\n    report,\n    fix,\n    scan,\n} = renameFiles({\n    type: 'module',\n    mask: '*.mjs',\n    rename(name) {\n        return name.replace(/mjs$/, 'js');\n    },\n});\n```\n\n## apply-for-of-to-track-file\n\n> The **Generator** object is returned by a `generator function` and it conforms to both the iterable protocol and the `iterator` protocol.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator)\n\n`trackFile` is generator function used to count progress that can be used in [**Scanner**](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#scanner).\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/5ec6c384aa6e4471aab17efb86e185f3/e749c7d649ef2da76410a5964e7c875d10538789)\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.scan = (path, {push, trackFile}) => {\n    trackFile(path, '*.swp').map(push);\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.scan = (path, {push, trackFile}) => {\n    for (const file of trackFile(path, '*.swp')) {\n        push(file);\n    }\n};\n```\n\n## apply-get-binding\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/6c82eac69034a1bb10405aec9d0c9df1/acc0ced44417671f1af60b84f4d9707c735365f0).\n\n### ❌ Example of incorrect code\n\n```js\npath.scope.getBinding('require');\n```\n\n### ✅ Example of correct code\n\n```js\ngetBinding(path, 'require');\n```\n\n## apply-insert-after\n\nBetter to use [`insertAfter(a, b)`](https://github.com/coderaiser/putout/tree/master/packages/operate#insert-after) method of `operator`.\nIt helps to avoid duplication of comments.\n\n### ❌ Example of incorrect code\n\n```js\nexport const fix = (path) => {\n    path.insertAfter(path.get('init'));\n};\n```\n\n### ✅ Example of correct code\n\n```js\nimport {operator} from 'putout';\n\nconst {insertAfter} = operator;\n\nexport const fix = (path) => {\n    insertAfter(path, path.get('init'));\n};\n```\n\n## apply-insert-before\n\nBetter to use [`insertBefore(a, b)`](https://github.com/coderaiser/putout/tree/master/packages/operate#insert-before) method of `operator`.\n\n### ❌ Example of incorrect code\n\n```js\nexport const fix = (path) => {\n    path.insertBefore(path.get('init'));\n};\n```\n\n### ✅ Example of correct code\n\n```js\nimport {operator} from 'putout';\n\nconst {insertBefore} = operator;\n\nexport const fix = (path) => {\n    insertBefore(path, path.get('init'));\n};\n```\n\n## apply-lowercase-to-node-builders\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/fe78f6e48998fb39fa7e53e4046f1fc0/e1e6f2387895ff2ab98b4a9bcd2e8d565f7c3f16).\n\n### ❌ Example of incorrect code\n\n```js\npath.node = Identifier('x');\n```\n\n### ✅ Example of correct code\n\n```js\npath.node = identifier('x');\n```\n\n## apply-name-to-is-identifier\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9d416e21377a53ef13066007f7037bdf/e179718fe1908851c26f10ba84fab1bf7ebca3ce).\n\n### ❌ Example of incorrect code\n\n```js\nisIdentifier(path, 'hello');\n```\n\n### ✅ Example of correct code\n\n```js\nisIdentifier(path, {\n    name: 'hello',\n});\n```\n\n## apply-namespace-specifier\n\nMost likely what you need is [`esm/resolve-imported-file`](https://github.com/coderaiser/putout/tree/master/packages/plugin-esm#resolve-imported-file).\n\n### ❌ Example of incorrect code\n\n```js\nimport rmUnused from '@putout/plugin-remove-unused-variables';\n```\n\n### ✅ Example of correct code\n\n```js\nimport * as rmUnused from '@putout/plugin-remove-unused-variables';\n```\n\n## apply-parens\n\nBetter use [`addParens(path)`](https://github.com/coderaiser/putout/tree/master/packages/operate#addparenspath-path) method of `operator` instead of using `path.node.extra` to have support of both printers:\n\n- ✅ `@putout/printer`;\n- ✅ `babel`;\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/d325a84e26807d46b5ec14db179c38f4/8bcd22d6dbe880c0fd70992a1a36b9c609b53b22).\n\n### ❌ Example of incorrect code\n\n```js\npath.node.extra.parenthesized = false;\npath.node.extra.parenthesized = true;\n\nif (!path.node.extra?.parenthesized)\n    return;\n```\n\n### ✅ Example of correct code\n\n```js\nremoveParens(path);\naddParens(path);\n\nif (!hasParens(path))\n    return;\n```\n\n## apply-processors-destructuring\n\n### ❌ Example of incorrect code\n\n```js\ntest('', async (t) => {\n    await t.process({});\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('', async ({process}) => {\n    await process({});\n});\n```\n\n## apply-processors-destructuring\n\n### ❌ Example of incorrect code\n\n```js\ntest('', async (t) => {\n    await t.process({});\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('', async ({process}) => {\n    await process({});\n});\n```\n\n## apply-remove\n\nBetter to use [`remove(path)`](https://github.com/coderaiser/putout/tree/master/packages/operate#removepath) method of `operator`.\nIt helps to preserve comments.\n\n### ❌ Example of incorrect code\n\n```js\nexport const fix = (path) => {\n    path.remove();\n};\n```\n\n### ✅ Example of correct code\n\n```js\nimport {operator} from 'putout';\n\nconst {remove} = operator;\n\nexport const fix = (path) => {\n    remove(path);\n};\n```\n\n## apply-rename\n\nBetter use [`rename(path, from, to)`](https://github.com/coderaiser/putout/tree/master/packages/operate#rename) method of `operator`.\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/22716f61af86351331fc92260b7ed8e6/1435f31954764c119813e03654caa36e6a2a666b).\n\n### ❌ Example of incorrect code\n\n```js\nexport const fix = ({path, from, to}) => {\n    path.scope.rename(from, to);\n};\n```\n\n### ✅ Example of correct code\n\n```js\nimport {operator} from 'putout';\n\nconst {rename} = operator;\n\nexport const fix = ({path, from, to}) => {\n    rename(path, from, to);\n};\n```\n\n## apply-report\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/e9debc0b256556a632fb031be86afffc/afefbd44443f07dbb7d8f2972f2e40a9a82c214f).\n\n### ❌ Example of incorrect code\n\n```js\nt.noReport('rename-files-full', {\n    from: ['/'],\n    to: [],\n});\nt.noReportWithOptions('rename-files-full');\nt.noReport('a', 'Use b');\nt.report('a');\n```\n\n### ✅ Example of correct code\n\n```js\nt.noReportWithOptions('rename-files-full', {\n    from: ['/'],\n    to: [],\n});\nt.noReport('rename-files-full');\nt.report('a', 'Use b');\nt.noReport('a');\n```\n\n## apply-short-processors\n\nApply short names of processors, for example `__json` instead of `__putout_processor_json` . Checkout out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/908151edd3ee8d6a07d589df1e863883/1bd1eeadadea40915a2079f33a3845fa4fedda8e).\n\n### ❌ Example of incorrect code\n\n```js\nexport const match = () => ({\n    '__putout_processor_ignore(__a)': ({__a}) => {\n        const list = __a.elements.map(getValue);\n    },\n    '__putout_processor_filesystem(__a)': ({__a}) => {\n        const list = __a.elements.map(getValue);\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const match = () => ({\n    [__ignore]: ({__array}) => {\n        const list = __array.elements.map(getValue);\n    },\n    [__filesystem]: ({__object}) => {\n        const list = __object.elements.map(getValue);\n    },\n});\n```\n\n## apply-string-to-property-key\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/46e3930cbdf32d316c0c6cb21eb59f5a/aecd754638d0bac8252048a4f4b3131c15ef6c6f).\n\n### ❌ Example of incorrect code\n\n```js\nexport const replace = {\n    [`section('@select', select(__args))`]: ({__args}, path) => {\n        __args.unshift(identifier('id'));\n        return path;\n    },\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport const replace = {\n    'section(\"@select\", select(__args))\"': ({__args}, path) => {\n        __args.unshift(identifier('id'));\n        return path;\n    },\n};\n```\n\n## apply-transform-with-options\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/92d40d40c75481816a5b5507e01d8315/bb54e932b4fff4bc0b453d723c72c7a9ed796b98).\n\n### ❌ Example of incorrect code\n\n```js\nt.transform('submenu', {\n    submenuIndex: 1,\n    insideSubmenu: true,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nt.transformWithOptions('submenu', {\n    submenuIndex: 1,\n    insideSubmenu: true,\n});\n```\n\n## apply-traverser-to-ignore\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/ff74cf775696df17a5ba96c7ec309821/1cbdee25af883ccefd0a3614fe8424d8690fc58a).\n\n### ❌ Example of incorrect code\n\n```js\nexport const {\n    report,\n    match,\n    replace,\n} = ignore({\n    type: __json,\n    name: '.nycrc.json',\n    field: 'exclude',\n    list: ['*.config.*'],\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const {\n    report,\n    fix,\n    traverse,\n} = ignore({\n    type: __json,\n    name: '.nycrc.json',\n    field: 'exclude',\n    list: ['*.config.*'],\n});\n```\n\n## apply-vars\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/6b1a4b5dc75f2591faf580774d23b38f/7278945371ceb76942494f7caf88375d2eaca869).\n\n### ❌ Example of incorrect code\n\n```js\nexport const replace = () => ({\n    '__a(__args': ({}, path) => {\n        return true;\n    },\n});\nexport const match = () => ({\n    '__a(__args': ({}, path) => {\n        return '';\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const replace = () => ({\n    '__a(__args': (vars, path) => {\n        return true;\n    },\n});\nexport const match = () => ({\n    '__a(__args': (vars, path) => {\n        return '';\n    },\n});\n```\n\n## check-declare\n\nChecks that [Declarator](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#declarator) transform is possible.\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9fccb187bb8933afff0dc0db57b3cea8/25cb812978fadb4efb5f0cb44058a61f70f8b78e):\n\n### ❌ Example of incorrect code\n\n```js\nexport const match = () => ({\n    'nemesis.getChar()': () => {\n        return path.parentPath.isExpressionStatement();\n    },\n    'getChar()': ({__a}) => {\n        return path.parentPath.isExpressionStatement();\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const match = () => ({\n    'nemesis.getChar()': (vars, path) => {\n        return path.parentPath.isExpressionStatement();\n    },\n    'getChar()': ({__a}, path) => {\n        return path.parentPath.isExpressionStatement();\n    },\n});\n```\n\n## check-match\n\nChecks that [Replacer](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#replacer) `match()` keys exists in `replace`.\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/c245bee6b129614b2f68c2e89fc3b101/d9f935ccd7f41ff166111cd62277f3244b1d526e).\n\n### ❌ Example of incorrect code\n\n```js\nexport const scan = (root, {trackFile}) => {\n    for (const file of trackFile(root, names)) {\n        push(file);\n    }\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport const scan = (root, {trackFile, push}) => {\n    for (const file of trackFile(root, names)) {\n        push(file);\n    }\n};\n```\n\n## check-replace-code\n\nChecks that [Replacer](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#replacer) transform is possible.\nPass `once=false` to always fail no matter how many `fixCounts` passed.\n\n### ❌ Example of incorrect code\n\n```js\nexport const traverse = () => ({\n    TSUnionType() {\n        console.log(path);\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const traverse = () => ({\n    TSUnionType(path) {\n        console.log(path);\n    },\n});\n```\n\n## convert-add-argument-to-add-args\n\n### ❌ Example of incorrect code\n\n```js\ntest('', () => {\n    comparePlaces();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('', ({comparePlaces}) => {\n    comparePlaces();\n});\n```\n\n## convert-babel-types\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.preProcess = () => {};\nmodule.exports.postProcess = () => {};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.branch = (rawSource) => [];\nmodule.exports.merge = (processedSource, list) => '';\n```\n\n## convert-destructuring-to-identifier\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.match = () => ({\n    'module.exports.traverse = __a'({}, path) {},\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.match = () => ({\n    'module.exports.traverse = __a': ({}, path) => {},\n});\n```\n\n## convert-dirname-to-url\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.traverse = () => ({\n    '__a.replace(/__b/g, __c)': (path) => {\n        push(path);\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.traverse = ({push}) => ({\n    '__a.replace(/__b/g, __c)': (path) => {\n        push(path);\n    },\n});\n```\n\n- [`store`](https://github.com/coderaiser/putout/blob/master/packages/engine-runner/README.md#store)\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.traverse = () => ({\n    ImportDeclaration(path) {\n        const {node} = path;\n        const {name} = node.specifiers[0].local;\n        \n        store('name', name);\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.traverse = ({store}) => ({\n    ImportDeclaration(path) {\n        const {node} = path;\n        const {name} = node.specifiers[0].local;\n        \n        store('name', name);\n    },\n});\n```\n\n- [`listStore``](https://github.com/coderaiser/putout/blob/master/packages/engine-runner/README.md#liststore)\n\n### ❌ Example of incorrect code\n\n```js\nexport const traverse = () => ({\n    ImportDeclaration(path) {\n        listStore(path);\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.traverse = ({listStore}) => ({\n    ImportDeclaration(path) {\n        listStore(path);\n    },\n});\n```\n\n- [`pathStore`](https://github.com/coderaiser/putout/blob/master/packages/engine-runner/README.md#pathstore)\n\n### ❌ Example of incorrect code\n\n```js\nexport const traverse = () => ({\n    'module.exports.match = __object': pathStore,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const traverse = ({pathStore}) => ({\n    'module.exports.match = __object': pathStore,\n});\n```\n\n## convert-get-file-content-to-read-file-content\n\nTo read file content use [`readFileContent`](https://github.com/coderaiser/putout/tree/master/packages/operator-filesystem#readfilecontentfilepath-filepath-string) and never confuse.\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/828da75f16a526652b138948d810ed9e/754bd02869a7e4e119e9fb442dab93df7785fb56).\n\n### ❌ Example of incorrect code\n\n```js\nconst {operator} = require('putout');\nconst {addArgument} = operator;\n\nmodule.exports = addArgument({\n    t: ['t', 'test(\"__a\", (__args) => __body)'],\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst {operator} = require('putout');\nconst {addArgs} = operator;\n\nmodule.exports = addArgs({\n    t: ['t', 'test(\"__a\", (__args) => __body)'],\n});\n```\n\n## convert-get-rule-to-require\n\n- ✅ import [Nested plugins](https://github.com/coderaiser/putout/tree/master/packages/engine-loader#nested-plugin) in [**Deno** and **Browser**](https://github.com/putoutjs/bundle/);\n- ✅ easier bundle with rollup without [`dynamicRequireTargets`](https://github.com/rollup/plugins/tree/master/packages/commonjs/#dynamicrequiretargets);\n- ✅ easier to migrate to **ESM**;\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/38336fcc5b5ae6e441697e098067319c/dd98578c9554b7bd5dceee0499118f7d8216e1da).\n\n### ❌ Example of incorrect code\n\n```js\nexport const scan = (root, {push, progress}) => {\n    trackFile();\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport const scan = (root, {push, progress, trackFile}) => {\n    trackFile();\n};\n```\n\n## convert-include-to-traverse\n\nCheckout in 🐊[**Putout Editor*](https://putout.cloudcmd.io/#/gist/a41b5c943a74b59a6c18f31fc6d31937/d79c6084f49b6444536840bc2fc1fba725ba83f8).\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.replace = () => ({\n    'if (__a = __b) __body': 'if (__a === \"__b\") __body',\n});\n```\n\n☝️ *There is no `fix` for this rule, it used internally to be more confident about `test coverage`, because of declaration form, transforms cannon be checked by `nyc` and `c8`, and uncovered lines can find unfixable false positives when running on code.\nThis is additional tests, if you forget to test some case (from a big list of rules that is supported) it will be checked with this `rule` and make transforms more stable.*\n\n## convert-match-to-function\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.traverse = ({push, options}) => ({\n    [__filesystem](path) {\n        const {names} = options;\n        \n        for (const name of names) {\n            const files = findFile(path, name);\n            \n            for (const file of files) {\n                push({\n                    name,\n                    path: file,\n                });\n            }\n        }\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.scan = (path, {push, options}) => {\n    const {names} = options;\n    \n    for (const name of names) {\n        const files = findFile(path, name);\n        \n        for (const file of files) {\n            push(file, {\n                name,\n            });\n        }\n    }\n};\n```\n\n## convert-method-to-property\n\n- property simpler to work with;\n- support of [`convert-destructuring-to-identifier`](#convert-destructuring-to-identifier) which is `Replacer`, while `convert-method-to-property` is `Includer` (searches for `ObjectMethod` node);\n\n### ❌ Example of incorrect code\n\n```js\nexport const filter = () => {\n    return path.isStringLiteral();\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport const filter = (path) => {\n    return path.isStringLiteral();\n};\n```\n\n## convert-node-to-path-in-get-template-values\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.declare = () => ({\n    isNumber: 'const isNumber = () => {}',\n    isString: 'const isNumber = () => {}',\n});\n```\n\n☝️ *There is no `fix` for this rule, it used internally to be more confident about `test coverage`, because of declaration form, transforms cannon be checked by `nyc` and `c8`, and uncovered lines can find unfixable false positives when running on code.\nThis is additional tests, if you forget to test some case (from a big list of rules that is supported) it will be checked with this `rule` and make transforms more stable.*\n\n## convert-number-to-numeric\n\nPrevent `Babel` warning: `The node type NumberLiteral has been renamed to NumericLiteral`.\n\n### ❌ Example of incorrect code\n\n```js\nconst {\n    ObjectExpression,\n    SpreadElement,\n    isObjectExpression,\n    isIdentifier,\n} = require('@babel/types');\n```\n\n### ✅ Example of correct code\n\n```js\nconst {\n    ObjectExpression,\n    SpreadElement,\n    isObjectExpression,\n    isIdentifier,\n} = require('putout').types;\n```\n\n## convert-plugins-element-to-tuple\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/abcc9f79469db69849b6d6efd3e85a8a/0536c9f780a0c9db2feed3be92299a22f06b9720).\n\n### ❌ Example of incorrect code\n\n```js\nconst {__a, __b} = getTemplateValues(path.node, 'const __a = __b');\n```\n\n### ✅ Example of correct code\n\n```js\nconst {__a, __b} = getTemplateValues(path, 'const __a = __b');\n```\n\n## convert-process-to-find\n\n### ❌ Example of incorrect code\n\n```js\nexport const fix = () => {\n    path.remove();\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport const fix = (path) => {\n    path.remove();\n};\n```\n\n## convert-push-object-to-push-path\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/fc54c923cb3cc4095c3c1d84d7ae7982/7de8eace54c8068be4ec5954ad4dde6d52ec6ca6).\n\n### ❌ Example of incorrect code\n\n```js\nconst parseOptions = require('putout/lib/parse-options');\n```\n\n### ✅ Example of correct code\n\n```js\nconst parseOptions = require('putout/parse-options');\n```\n\n## convert-putout-test-to-create-test\n\nFixes results of [@putout/convert-commonjs-to-esm](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-commonjs-to-esm#readme) work.\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.replace = () => ({\n    'const __a = __b': ({}) => {},\n    'const __c = __d': ({}, path) => {},\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.replace = () => ({\n    'const __a = __b': (vars) => {},\n    'const __c = __d': (vars, path) => {},\n});\n```\n\n## convert-replace-to-function\n\n### ❌ Example of incorrect code\n\n```js\nexport const traverse = () => ({\n    [__markdown]: (path) => {\n        traverse();\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const traverse = () => ({\n    [__markdown]: (path) => {\n        superTraverse(path, {\n            '__a(__b, __c)': (path) => {},\n        });\n    },\n});\n```\n\n## add-places-to-compare-places\"\n\n### ❌ Example of incorrect code\n\n[`comparePlaces`](https://github.com/coderaiser/putout/tree/master/packages/test#compareplacesfilename-places-overrides) takes two or more arguments.\n\nCheckout in 🐊[Putout Editor](https://putout.cloudcmd.io/#/gist/a83b1a6785bb01102451df4510333f42/a2439f7f44da56318d9a0e44b2602972811d9afb).\n\n```js\ncomparePlaces('hello');\n```\n\n### ✅ Example of correct code\n\n```js\ncomparePlaces('hello', []);\n```\n\n## convert-replace-to-traverse\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/a87ab50e500cd3aee3099063a48c0e3f/8dee3919638062563c9b39886d8bb8581f5722f2).\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.traverse = () => ({\n    'async (__a) => __b': 'async ({process}) => __b',\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.replace = () => ({\n    'async (__a) => __b': 'async ({process}) => __b',\n});\n```\n\n## convert-replace-with\n\n### ❌ Example of incorrect code\n\n```js\nexport const include = () => ({\n    ClassDeclaration(path) {},\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const traverse = () => ({\n    ClassDeclaration(path) {},\n});\n```\n\n## convert-replace-with-multiple\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.traverse = ({push}) => ({\n    TSTypeAssertion(path) {\n        push(path);\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.include = () => [\n    'TSTypeAssertion',\n];\n```\n\n## convert-report-to-function\n\n### ❌ Example of incorrect code\n\n```js\nexport const scan = (root, {push, progress}) => {\n    crawlFile();\n};\n```\n\n### ✅ Example of correct code\n\n```js\nexport const scan = (root, {push, progress, crawlFile}) => {\n    crawlFile();\n};\n```\n\n## convert-to-no-transform-code\n\n### ❌ Example of incorrect code\n\n```diff\n## Rules\n-- ✅ [remove-illegal-strict-mode](#remove-useless-strict-mode);\n-- ✅ [add-node-prefix](#add-node-prefix);\n+- ✅ [add-node-prefix](#add-node-prefix);\n+- ✅ [remove-illegal-strict-mode](#remove-useless-strict-mode);\n```\n\n## convert-traverse-to-include\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.match = () => ({\n    '__a = __b': (vars, path) => {},\n});\nmodule.exports.replace = () => ({\n    '__a = __': '__a',\n});\n```\n\n☝️ *There is no `fix` for this rule, it used internally to be more confident about `test coverage`, because of declaration form, transforms cannon be checked by `nyc` and `c8`, and uncovered lines can find unfixable false positives when running on code.\nThis is additional tests, if you forget to test some case (from a big list of rules that is supported) it will be checked with this `rule` and make transforms more stable.*\n\n## convert-traverse-to-replace\n\n### ❌ Example of incorrect code\n\n```js\nexport const match = () => ({\n    '__a(__args': (vars, path) => {\n        fn(x);\n        return __args[__a];\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const match = () => ({\n    '__a(__args': ({__args, __a}, path) => {\n        fn(x);\n        return __args[__a];\n    },\n});\n```\n\n## convert-traverse-to-scan\n\nCheckout in 🐊**Putout Editor**:\n\n- [`Traverser`](https://putout.cloudcmd.io/#/gist/afe988c8e53ae70e50bf26512672f3cd/a6677d53b996e85880a4af18250c00e849322bbe);\n- [`Replacer`](https://putout.cloudcmd.io/#/gist/2e89f498c88f3208beeb85dd01a9178e/ed975281c57f451fc1c3aaf187425a33499af71d);\n\n### ❌ Example of incorrect code\n\n```js\nexport const match = () => ({\n    '__x __a __expr': ({__x}) => {\n        if (path.isNextPunctuator(assign))\n            return false;\n        \n        return isOneOfKeywords(__x, ['const', 'let', 'var']);\n    },\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const match = () => ({\n    '__x __a __expr': ({__x}) => {\n        if (path.isNextPunctuator(assign))\n            return false;\n        \n        return isOneOfKeywords(__x, ['const', 'let', 'var']);\n    },\n});\n```\n\n## convert-traverse-to-super-traverse\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/131b7af8e25a454b293d592d2faa2cd8/f8ae176880de753eb50236d841a1a3bb8e494e2f).\n\n### ❌ Example of incorrect code\n\n```js\ncompare(a, 'const __a = __b');\nisIdentifier(a);\n```\n\n### ✅ Example of correct code\n\n```js\nimport {operator, types} from 'putout';\n\nconst {compare} = operator;\nconst {isIdentifier} = types;\n\ncompare(a, 'const __a = __b');\nisIdentifier(a);\n```\n\n## convert-url-to-dirname\n\n### ❌ Example of incorrect code\n\n```js\ntest('', ({progress}) => {\n    progress();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('', async ({progress}) => {\n    await progress();\n});\n```\n\n## create-test\n\nAdd properties to `createTest` options, here is example of `.putout.json`:\n\n```json\n```\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/e2a9f02d352c064ac9a11688feadc923/2a525f0a8a2794c9d26c23914801c512f347abef).\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.match = {\n    'let __a = __b': () => false,\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.match = () => ({\n    'let __a = __b': () => false,\n});\n```\n\n## declare\n\n### ❌ Example of incorrect code\n\n```js\nimport {createTest} from '@putout/test';\nimport plugin from '@putout/plugin-debugger';\nimport {createSimport} from 'simport';\n\nconst {__dirname} = createSimport(import.meta.url);\n\nconst test = createTest(__dirname, {\n    'remove-debugger': plugin,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nimport {createTest} from '@putout/test';\nimport plugin from '@putout/plugin-debugger';\n\nconst test = createTest(import.meta.url, {\n    'remove-debugger': plugin,\n});\n```\n\n## declare-path-variable\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/b485bf55785ea836408d0d45c492c3e4/2a0b465076242ebf6a0d8015a90ccf7b0b660a42).\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.report = `'report' should be a 'function'`;\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.report = () => `'report' should be a 'function'`;\n```\n\n## declare-template-variables\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/71ae86cc372dca8adc79bf53c49e8d5f/c9c8517ee932c18abcfda10c0515253b907ee485).\n\n### ❌ Example of incorrect code\n\n```js\nconst {createTest} = require('@putout/test');\nconst plugin = require('@putout/plugin-debugger');\n\nconst test = createTest(__dirname, {\n    'remove-debugger': plugin,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst {createTest} = require('@putout/test');\nconst plugin = require('@putout/plugin-debugger');\n\nconst test = createTest(import.meta.url, {\n    'remove-debugger': plugin,\n});\n```\n\n## convert-progress-to-track\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/8736a0cf838a3660b0927e161e4fb06c/9f5c9f810babd4450898069d3d8dc28aceee1e2d).\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.scan = (root, {push, progress}) => {\n    const files = findFile(root, ['*']);\n    const n = files.length;\n    \n    for (const [i, file] of files.entries()) {\n        push(file);\n        progress({\n            i,\n            n,\n        });\n    }\n};\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.scan = (root, {push, trackFile}) => {\n    for (const file of trackFile(root, ['*'])) {\n        push(file);\n    }\n};\n```\n\n## includer\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.rules = getRule('remove-unused-variables');\n```\n\n### ✅ Example of correct code\n\n```js\nconst removeUnusedVariables = require('./remove-unused-variables');\n\nmodule.exports.rules = {\n    'remove-unused-variables': removeUnusedVariables,\n};\n```\n\n## move-require-on-top-level\n\n### ❌ Example of incorrect code\n\n```js\nconst content = getFileContent(file);\n```\n\n### ✅ Example of correct code\n\n```js\nconst content = readFileContent(file);\n```\n\n## remove-empty-array-from-process\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/fc32ff87e91fd28f26a03f55eba0663e/3423926ba0a80d30beafe2ac66c70c517df173e1).\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.include = () => 'cons __a = __b';\nmodule.exports.exclude = () => 'var __a = __b';\nmodule.exports.include = 'cons __a = __b';\nmodule.exports.exclude = 'var __a = __b';\nmodule.exports.include = [\n    'cons __a = __b',\n];\nmodule.exports.exclude = [\n    'var __a = __b',\n];\nexport const include = [\n    'cons __a = __b',\n];\nexport const exclude = [\n    'var __a = __b',\n];\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.include = () => [\n    'const __a = __b',\n];\nmodule.exports.exclude = () => [\n    'var __a = __b',\n];\nexport const include = () => [\n    'cons __a = __b',\n];\nexport const exclude = () => [\n    'var __a = __b',\n];\n```\n\n## remove-empty-object-from-transform\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/f6e8710edf3501a8883f769c82a93048/8060cb8e1505324bb13de511a67d051217a2c39c).\n\n### ❌ Example of incorrect code\n\n```js\ntest('plugin-putout: rename-operate-to-operator: transform: operator exist', (t) => {\n    t.noTransform('operator');\n    t.end();\n});\n\ntest('plugin-putout: rename-operate-to-operator: report: operator exist', (t) => {\n    t.noReport('operator');\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('plugin-putout: rename-operate-to-operator: no transform: operator exist', (t) => {\n    t.noTransform('operator');\n    t.end();\n});\n\ntest('plugin-putout: rename-operate-to-operator: no report: operator exist', (t) => {\n    t.noReport('operator');\n    t.end();\n});\n```\n\n## remove-message-from-no-report-after-transform\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/b40b73049530d6c4e142a4d4b09e29e2/2167f30abebc5713e2db916a2a0152e13722e7b1).\n\n### ❌ Example of incorrect code\n\n```js\ntest('hello', (t) => {\n    t.transform('nested-labels', {});\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('hello', (t) => {\n    t.transform('nested-labels');\n});\n```\n\n## remove-unused-get-properties-argument\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/fc32ff87e91fd28f26a03f55eba0663e/3423926ba0a80d30beafe2ac66c70c517df173e1).\n\n### ❌ Example of incorrect code\n\n```js\nawait process('input', []);\n```\n\n### ✅ Example of correct code\n\n```js\nawait process('input');\n```\n\n## remove-useless-printer-option\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/f176313cf67fd6d7138470385511319f/5b26aa45db21f250016d228b7bbabbb3c10b582b).\n\n`putout` printer used by default, so there is no need to pass it.\n\n### ❌ Example of incorrect code\n\n```js\nconst {\n    overridesPath,\n    parserPath,\n    rulesPath,\n} = getProperties(__jsonPath, [\n    'parser',\n    'rules',\n    'overrides',\n    'extends',\n]);\n```\n\n### ✅ Example of correct code\n\n```js\nconst {\n    overridesPath,\n    parserPath,\n    rulesPath,\n} = getProperties(__jsonPath, ['parser', 'rules', 'extends']);\n```\n\n## remove-useless-source-argument\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9b5f94d6a60f3337f925fcc338370d83/7e944de0dfdd64b3c74d490aae21b04015b8262f).\n\n### ❌ Example of incorrect code\n\n```js\ntest('github: set-message-of-commit-fixes: no report after transform', (t) => {\n    t.noReportAfterTransform('set-message-of-commit-fixes', `Set 'message' of 'Commit fixes'`);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('github: set-message-of-commit-fixes: no report after transform', (t) => {\n    t.noReportAfterTransform('set-message-of-commit-fixes');\n    t.end();\n});\n```\n\n## replace-test-message\n\nChecks that `test message` and used `operator` are synchronized.\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/d9c6972ea848ba8e7e745d2479727b65/199c30b986ce7d544397c344ebfc5031c4b53181).\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('@putout/test')(__dirname, {\n    'remove-debugger': require('..'),\n});\n\ntest('remove debugger: report', (t) => {\n    t.transform('debugger', {\n        'remove-debugger': require('..'),\n    });\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst removeDebugger = require('..');\nconst test = require('@putout/test')(__dirname, {\n    'remove-debugger': removeDebugger,\n});\n\ntest('remove debugger: report', (t) => {\n    t.transform('debugger', {\n        'remove-debugger': removeDebugger,\n    });\n    t.end();\n});\n```\n\n## shorten-imports\n\n### ❌ Example of incorrect code\n\n```js\nconst test = createTest(__dirname, {\n    printer: 'putout',\n    plugins: [\n        ['remove-unchanged-zero-declarations', plugin],\n    ],\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst test = createTest(__dirname, {\n    plugins: [\n        ['remove-unchanged-zero-declarations', plugin],\n    ],\n});\n```\n\n## simplify-replace-template\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/a012fc12f4d38038da022f7c8f379fe2/c65bf97c42650aa31c5481849bc934323df892a6).\n\n### ❌ Example of incorrect code\n\n```js\nmodule.exports.replace = () => ({\n    'if (__a) {__b} else {__c}': () => 'if (__a) __b; else __c',\n});\n```\n\n### ✅ Example of correct code\n\n```js\nmodule.exports.replace = () => ({\n    'if (__a) {__b} else {__c}': 'if (__a) __b; else __c',\n});\n```\n\n## sort-readme-file\n\nCheckout in 🐊**Putout Editor**:\n\n- ✅ [`add-missing-semicolon`](https://putout.cloudcmd.io/#/gist/7c7ab5cbedef8d6021ce2a77b5caa4f0/aee514d0cc4ef0ea26f4fdcf4def03a078eb1bd0);\n- ✅ [`sort-contents`](https://putout.cloudcmd.io/#/gist/647bcc98ba9eeaa619dfa90d129ee0ec/a19ba868e8c2f97292e763675de65cc1ec98ff66);\n- ✅ [`sort-headings`](https://putout.cloudcmd.io/#/gist/a5a23310a84cb209e7e5537bab294ab2/0ecd88ffa6e37ac2553cabe5333d307aed2c4a7d);\n- ✅ [`sort-config`](https://putout.cloudcmd.io/#/gist/41c9975090803fdee30c445868e5b93f/18f78a72eb4f4cf33f5137fca11de9314c12763c);\n- ✅ [`sort-readme-file`](https://putout.cloudcmd.io/#/gist/41c9975090803fdee30c445868e5b93f/a5edcb99b4769c05d6482a051f918442bdcc86e9);\n\n## apply-fixture-name-to-message\"\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/66eb493ee966c2465a9fc783cd3ca362/f42ec60e393181b6d6aaf6df81640e93fabe8783).\n\n```js\ntest('flatlint: convert-comma-to-semicolon: no report: xxx', (t) => {\n    t.noReport('array');\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('flatlint: convert-comma-to-semicolon: no report: array', (t) => {\n    t.noReport('array');\n    t.end();\n});\n```\n\n## apply-type-check\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/3176ff5d9bfb388723c977735e49d599/00036b9cbd71b1a778c8423e2e7a707abd9f2f1f).\n\n### ❌ Example of incorrect code\n\n```js\nif (a.type === 'CallExpression') {}\n```\n\n### ✅ Example of correct code\n\n```js\nif (isCallExpression(a)) {}\n```\n\n## convert-replacer-to-includer\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/4b5e172466fda5e8fb114e767639f7ee/d3af95da4418b8c0e761d8cd50c1fa38a412b55c).\n\n### ❌ Example of incorrect code\n\n```js\nexport const replace = () => ({\n    'const [__a, {__b}] = __c(__d, __e)': 'const [__a, {__b}] = __c(__d, __e)',\n    'const [__a, {__b = {}} = {}] = __c(__d, __e)': 'const [__a, {__b = {}} = {}] = __c(__d, __e)',\n});\n```\n\n### ✅ Example of correct code\n\n```js\nexport const fix = () => {};\nexport const include = () => [\n    'const [__a, {__b}] = __c(__d, __e)',\n    'const [__a, {__b = {}} = {}] = __c(__d, __e)',\n];\n```\n\n## remove-useless-match\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/a813e8b3da2ccbe949a3156842c3112e/5e21a147247c2451f9f826ba384d62ab37c17a01).\n\n### ❌ Example of incorrect code\n\n```js\nexport const match = () => ({\n    'const [__a, {__b}] = __c(__d, __e)': () => true,\n    'const [__a, {__b = {}} = {}] = __c(__d, __e)': () => true,\n});\n```\n\n### ✅ Example of correct code\n\n```js\n```\n\n## remove-useless-type-check-declaration\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/443f742c8cda2b50e1722cdf2577d5c3/1f269a3d5ae0dcfa8661ca283b329c53c2450b39).\n\n### ❌ Example of incorrect code\n\n```js\nconst isStringLiteral = (arg) => arg.type === 'StringLiteral';\n```\n\n### ✅ Example of correct code\n\n```js\n```\n\n## shorten-path-get\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/afc8a421eee129910153939eae2eb79e/04304530529a53f5894a289bcd83d3ac2460c9ab).\n\n### ❌ Example of incorrect code\n\n```js\nconst elements = path.get('arguments')[0].get('elements');\n```\n\n### ✅ Example of correct code\n\n```js\nconst elements = path.get('arguments.0.elements');\n```\n\n## License\n\nMIT\n","publish_time":1757155458261,"_cnpm_publish_time":1757155458261,"dist-tags":{"latest":"29.36.1"}}