{"_id":"@putout/plugin-apply-global-this","_rev":"3-115d134f2d7bf87ac29474b629d1f647","name":"@putout/plugin-apply-global-this","dist-tags":{"latest":"2.0.0"},"versions":{"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","tarball":"https://registry.npmjs.org/@putout/plugin-apply-global-this/-/plugin-apply-global-this-1.0.0.tgz","fileCount":4,"integrity":"sha512-h8xOoUbOL5EMCPgl70ps9G+n6ZwnKPgnb09cd+oc6wmqOY/R7xh5EOAJd0LPKvIr3cgkOTjC/wwrmms0W5xv1g==","signatures":[{"sig":"MEUCIQC7ULF7TwtLDfcrNvQ6s4V0eyCCtkcGTbNIPL7oHSw7RwIgDRHLxzA7EEFFC74kUcUxnzr+T1uirI6e+fvGfu0KQV0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4756},"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"}},"1.0.1":{"name":"@putout/plugin-apply-global-this","version":"1.0.1","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.1","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":"51c6fc49860a0fac9cdd6b7b40bfd3efc41bade4","tarball":"https://registry.npmjs.org/@putout/plugin-apply-global-this/-/plugin-apply-global-this-1.0.1.tgz","fileCount":4,"integrity":"sha512-+Rc0kd0qCKXZ5ae0bi8vbYfifTqeZVqpjP9ZdMdjbxSbU5QB/Xji8Vfs6a82g1p/n1Q4YJnWmjUZ1mLh59ZApQ==","signatures":[{"sig":"MEQCIDX33S71Yba94v1ployHSlFiKPVYPTpR47Qi8uQvGTrsAiAgnzhQDIVml87cOiUTylLNIK8ibnyZfYUeA1EE5XBckA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4757},"main":"lib/apply-global-this.js","type":"module","engines":{"node":">=22"},"gitHead":"28dd48922915ab213ba973abb1c5a31718b08c05","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.1_1768508667883_0.27302811518953884","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@putout/plugin-apply-global-this","version":"2.0.0","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","eslint":"^10.0.0","eslint-plugin-putout":"^31.0.0","madrun":"^13.0.0","nodemon":"^3.0.1","superc8":"^12.0.0"},"peerDependencies":{"putout":">=42"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-apply-global-this@2.0.0","gitHead":"894f1c7189c06f9ec77fce5220169e0350702cd7","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"26.2.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-g0fAOPgT9LBPOI3Devrr1WFx8h09YCDz45TMzfbeKB2SCOxc1ZMi7jjg/jqRYnbtcvoJBAYU+6mftWuuPmzL6g==","shasum":"b9dc8d4c20465add280d9bb099d7d50112523a32","tarball":"https://registry.npmjs.org/@putout/plugin-apply-global-this/-/plugin-apply-global-this-2.0.0.tgz","fileCount":4,"unpackedSize":4855,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICFsdEvSNwjY4HoOcQOlqcAVVI8escBi7qhbxZINEFrTAiEA2gpDHLEB+DwnZIQeFagVqNQ3nNcXlXckkhh0q50PRLM="}]},"_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_2.0.0_1779707243463_0.3858473565291345"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-15T16:24:02.352Z","modified":"2026-05-25T11:07:23.727Z","1.0.0":"2026-01-15T16:24:02.549Z","1.0.1":"2026-01-15T20:24:28.049Z","2.0.0":"2026-05-25T11:07:23.606Z"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"license":"MIT","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-global-this#readme","keywords":["putout","putout-plugin","putout-plugin-remove","plugin","global-this"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"description":"🐊Putout plugin adds ability to find and apply 'globalThis'","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"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","readmeFilename":"README.md"}