{"_id":"@putout/plugin-apply-global-this","_rev":"4160231","name":"@putout/plugin-apply-global-this","description":"🐊Putout plugin adds ability to find and apply 'globalThis'","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:37:53.000Z","created":"2026-01-15T16:24:02.549Z","1.0.1":"2026-01-15T20:24:28.049Z","1.0.0":"2026-01-15T16:24:02.549Z"},"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":{"1.0.1":{"name":"@putout/plugin-apply-global-this","version":"1.0.1","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to find and apply 'globalThis'","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-global-this#readme","main":"lib/apply-global-this.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":{},"keywords":["putout","putout-plugin","putout-plugin-remove","plugin","global-this"],"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":"^29.0.0","madrun":"^12.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=41"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-apply-global-this@1.0.1","gitHead":"28dd48922915ab213ba973abb1c5a31718b08c05","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.21.1","_npmVersion":"11.4.2","dist":{"shasum":"51c6fc49860a0fac9cdd6b7b40bfd3efc41bade4","size":2345,"noattachment":false,"key":"/@putout/plugin-apply-global-this/-/@putout/plugin-apply-global-this-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-global-this/download/@putout/plugin-apply-global-this-1.0.1.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-apply-global-this_1.0.1_1768508667883_0.27302811518953884"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-15T20:24:28.049Z","publish_time":1768508668049,"_source_registry_name":"default","_cnpm_publish_time":1768508668049},"1.0.0":{"name":"@putout/plugin-apply-global-this","version":"1.0.0","keywords":["putout","putout-plugin","putout-plugin-remove","plugin","global-this"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-apply-global-this@1.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-global-this#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"f66943b2b720a9a1771e403c37b68861f4b4e55c","size":2371,"noattachment":false,"key":"/@putout/plugin-apply-global-this/-/@putout/plugin-apply-global-this-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-global-this/download/@putout/plugin-apply-global-this-1.0.0.tgz"},"main":"lib/apply-global-this.js","type":"module","engines":{"node":">=22"},"gitHead":"0599dcdecc761260ad1b4417436bcd968f385971","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 adds ability to find and apply 'globalThis'","directories":{},"_nodeVersion":"22.21.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^10.0.0-alpha.0","madrun":"^12.0.0","nodemon":"^3.0.1","@putout/test":"^15.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^29.0.0"},"peerDependencies":{"putout":">=41"},"_npmOperationalInternal":{"tmp":"tmp/plugin-apply-global-this_1.0.0_1768494242409_0.02326933803472797","host":"s3://npm-registry-packages-npm-production"},"_cnpmcore_publish_time":"2026-01-15T16:24:02.549Z","publish_time":1768494242549,"_source_registry_name":"default","_cnpm_publish_time":1768494242549}},"readme":"# @putout/plugin-apply-global-this [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-global-this.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-global-this \"npm\"\n\n> Historically, accessing the global object has required different syntax in different JavaScript environments. On the web you can use `window`, `self`, or frames - but in Web Workers only `self` will work. In Node.js none of these work, and you must instead use `global`\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis)\n\n????[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and apply `globalThis`.\n\nCheck out in ????[Putout Editor](https://putout.cloudcmd.io/#/gist/c72c8e1b1d0c2b45fd0d15d837dcae52/c7f33d77d19efe962339debbcf20f68bf2159aee).\n\n## Install\n\n```\nnpm i @putout/plugin-apply-global-this\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"apply-global-this\": \"on\"\n    }\n}\n```\n\n### ❌ Example of incorrect code\n\n```js\nglobalThis.__putout_debug = debugFn;\nglobalThis.CloudCmd = {};\n```\n\n### ✅ Example of correct code\n\n```js\nglobalThis.__putout_debug = debugFn;\nglobalThis.CloudCmd = {};\n```\n\n### Comparison\n\nLinter | Rule | Fix\n-------|------|------------|\n???? **Putout** | [`apply-global-this`](https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-global-this#readme) | ✅\n⏣ **ESLint**  | [`no-node-globals`](https://docs.deno.com/lint/rules/no-node-globals/)  | ❌\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-global-this#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}