{"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":"http://registry-npm.ywwl.com/@putout/plugin-apply-global-this/download/@putout/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,"size":2371,"noattachment":false,"key":"/@putout/plugin-apply-global-this/-/@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"},"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","publish_time":1768494242549,"_cnpm_publish_time":1768494242549,"dist-tags":{"latest":"2.0.0"}}