{"_id":"@brunolemos/confusing-browser-globals","_rev":"1-82267c3eeef8d837fef77b3bb63988d6","name":"@brunolemos/confusing-browser-globals","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.6":{"name":"@brunolemos/confusing-browser-globals","version":"1.0.6","description":"A list of browser globals that are often used by mistake instead of local variables","license":"MIT","main":"index.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/facebook/create-react-app.git"},"keywords":["eslint","globals"],"devDependencies":{"jest":"23.6.0"},"bugs":{"url":"https://github.com/facebook/create-react-app/issues"},"homepage":"https://github.com/facebook/create-react-app#readme","_id":"@brunolemos/confusing-browser-globals@1.0.6","_npmVersion":"6.4.1","_nodeVersion":"8.11.4","_npmUser":{"name":"brunolemos","email":"bruno@brunolemos.org"},"dist":{"integrity":"sha512-OPsu77gGWWTdP4nSRLVSPiXjrPfhPRzC9L2cJlgRD2y1SdVj7KhHfV5ceGInIdttQ2223CUXhX6xD9GGDUujfw==","shasum":"0a04e45baf7c5747e5830dbb2d91c2bbcc331239","tarball":"https://registry.npmjs.org/@brunolemos/confusing-browser-globals/-/confusing-browser-globals-1.0.6.tgz","fileCount":4,"unpackedSize":3706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbz1vJCRA9TVsSAnZWagAAbC8P/0e0uwGIv7JnwzNIZRNV\nVhUIEkWAwlZv3AHiggmWN8mffj6uL6QFcXos9aDxLZCj+B38aqFIV5upkBhC\n2knpCYEzTFPkDlnzDJ+nkQaR1Ndtau59X9mWIfKfhfYXJ1xYug1CI6cwgzlW\nFSDM3AqBoD66qCWjmguUDVTEzcJHbFjTZx92FUkZcyG74AOL7JI/5RbArM0b\nF+fJes9QoxkXCTjKWiz6yYxEaF0/UFdt9kUDSzWIXpATP1i0AZkdVcV78iIV\nf6ZELC4M3QRl/56VDpjnr0SQaIpkbKRxZaevSJGB8Uv++QH9g8qWijnWli5D\nLy9zHDyRoRSut8z866RYXx1Q4ZtyF8YVwWP6qI9Y++aURNFSm4dyQmYBOE0r\nNbekC+4GP/o4ycu6SXNGsX25r82y+eEQo/AlKJWxt9WTTrJjLOlKO1HtGDMw\nS699kfUFf9j6bny/01WbdSMVlYWLLUrBRmpWStIeC9fB64XYCkHlwk9Xp1bw\nFa+SNzvbltpSDIcu1+NeAQREORgyNmvMX4JnPxA8/9rbyAsIOEN20UY6isQt\nl23wQwv9dFBDSigc0g9EQ81yPRl+Q32JPp+0NF22mZcllnI1o+5SSE9TO8Vv\nEjh+qmKDY2aCgk4c8V7t1UXTutwugLbrknNSFecG8pvB5w9PeQ62ENSOHVHp\nYsQ1\r\n=kt/I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPRPVGFtZaoxVgIJS09OKyP4pii6iETrJMoH47xNvNgwIhAJhxhZQ2tcZ1axBOOB4G0EdO2F5SBbTP7aGqWF80ygSx"}]},"maintainers":[{"name":"brunolemos","email":"bruno@brunolemos.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/confusing-browser-globals_1.0.6_1540316104372_0.23147604274086264"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-23T17:35:04.213Z","1.0.6":"2018-10-23T17:35:04.516Z","modified":"2022-04-04T20:49:24.377Z"},"maintainers":[{"name":"brunolemos","email":"bruno@brunolemos.org"}],"description":"A list of browser globals that are often used by mistake instead of local variables","homepage":"https://github.com/facebook/create-react-app#readme","keywords":["eslint","globals"],"repository":{"type":"git","url":"git+https://github.com/facebook/create-react-app.git"},"bugs":{"url":"https://github.com/facebook/create-react-app/issues"},"license":"MIT","readme":"# confusing-browser-globals\n\nA curated list of browser globals that commonly cause confusion and are not recommended to use without an explicit `window.` qualifier.\n\n## Motivation\n\nSome global variables in browser are likely to be used by people without the intent of using them as globals, such as `status`, `name`, `event`, etc.\n\nFor example:\n\n```js\nhandleClick() { // missing `event` argument\n  this.setState({\n  \ttext: event.target.value // uses the `event` global: oops!\n  });\n}\n```\n\nThis package exports a list of globals that are often used by mistake. You can feed this list to a static analysis tool like ESLint to prevent their usage without an explicit `window.` qualifier.\n\n## Installation\n\n```\nnpm install --save confusing-browser-globals\n```\n\n## Usage\n\nIf you use Create React App, you don't need to configure anything, as this rule is already included in the default `eslint-config-react-app` preset.\n\nIf you maintain your own ESLint configuration, you can do this:\n\n```js\nvar restrictedGlobals = require('confusing-browser-globals');\n\nmodule.exports = {\n  rules: {\n    'no-restricted-globals': ['error'].concat(restrictedGlobals),\n  },\n};\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}