{"versions":{"0.2.0":{"name":"eslint-restricted-globals","version":"0.2.0","description":"A list of confusing globals that should be restricted to be used as globals","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/doshisid/eslint-restricted-globals.git"},"keywords":["eslint","globals"],"author":{"name":"Siddharth Doshi","email":"sidoshi@mail.com"},"license":"MIT","devDependencies":{"mocha":"^3.4.1"},"gitHead":"0b3bf697cd24ab678523ba9e998b4132d3920d9f","bugs":{"url":"https://github.com/doshisid/eslint-restricted-globals/issues"},"homepage":"https://github.com/doshisid/eslint-restricted-globals#readme","_id":"eslint-restricted-globals@0.2.0","_npmVersion":"6.4.1","_nodeVersion":"9.3.0","_npmUser":{"name":"anonymous","email":"sidoshi@email.com"},"dist":{"shasum":"7729f326af97bec7a7e56d9f7d9c064b79285c50","size":1971,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/eslint-restricted-globals/-/eslint-restricted-globals-0.2.0.tgz"},"maintainers":[{"name":"anonymous","email":"dan.abramov@gmail.com"},{"name":"anonymous","email":"sidoshi510@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-restricted-globals_0.2.0_1541176357998_0.031993784104392686"},"_hasShrinkwrap":false,"publish_time":1541176358124,"_cnpm_publish_time":1541176358124,"contributors":[]},"0.1.1":{"name":"eslint-restricted-globals","version":"0.1.1","description":"A list of confusing globals that should be restricted to be used as globals","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/doshisid/eslint-restricted-globals.git"},"keywords":["eslint","globals"],"files":["index.js"],"author":{"name":"Siddharth Doshi","email":"sidoshi@mail.com"},"license":"MIT","devDependencies":{"mocha":"^3.4.1"},"gitHead":"91794a5e4f19be72132f43a6414ffff06e422b2b","bugs":{"url":"https://github.com/doshisid/eslint-restricted-globals/issues"},"homepage":"https://github.com/doshisid/eslint-restricted-globals#readme","_id":"eslint-restricted-globals@0.1.1","_shasum":"35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"anonymous","email":"sidoshi@email.com"},"dist":{"shasum":"35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7","size":1326,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz"},"maintainers":[{"name":"anonymous","email":"dan.abramov@gmail.com"},{"name":"anonymous","email":"sidoshi510@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-restricted-globals-0.1.1.tgz_1495272878503_0.6677297304850072"},"directories":{},"publish_time":1495272878616,"_hasShrinkwrap":false,"_cnpm_publish_time":1495272878616,"contributors":[]},"0.1.0":{"name":"eslint-restricted-globals","version":"0.1.0","description":"A list of confusing globals that should be restricted to be used as globals","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/doshisid/eslint-restricted-globals.git"},"keywords":["eslint","globals"],"files":["index.js"],"author":{"name":"Siddharth Doshi","email":"sidoshi@mail.com"},"license":"MIT","devDependencies":{"mocha":"^3.4.1"},"gitHead":"df9ad683088b4c5be1951fb512ab5027edeba4dc","bugs":{"url":"https://github.com/doshisid/eslint-restricted-globals/issues"},"homepage":"https://github.com/doshisid/eslint-restricted-globals#readme","_id":"eslint-restricted-globals@0.1.0","_shasum":"56e27c7d06b7e6bdef098497ded2f22884d4c318","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"anonymous","email":"sidoshi@email.com"},"dist":{"shasum":"56e27c7d06b7e6bdef098497ded2f22884d4c318","size":1374,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/eslint-restricted-globals/-/eslint-restricted-globals-0.1.0.tgz"},"maintainers":[{"name":"anonymous","email":"dan.abramov@gmail.com"},{"name":"anonymous","email":"sidoshi510@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-restricted-globals-0.1.0.tgz_1495272616937_0.2877060922328383"},"directories":{},"publish_time":1495272617080,"_hasShrinkwrap":false,"_cnpm_publish_time":1495272617080,"contributors":[]}},"dist-tags":{"latest":"0.2.0"},"name":"eslint-restricted-globals","time":{"modified":"2023-07-28T16:22:33.311Z","created":"2022-01-26T12:57:47.885Z","0.2.0":"2018-11-02T16:32:38.124Z","0.1.1":"2017-05-20T09:34:38.616Z","0.1.0":"2017-05-20T09:30:17.080Z"},"readme":"# eslint-restricted-globals [![npm](https://img.shields.io/npm/v/eslint-restricted-globals.svg?style=plastic)](https://www.npmjs.com/package/eslint-restricted-globals) [![npm](https://img.shields.io/npm/l/eslint-restricted-globals.svg?style=plastic)](https://www.npmjs.com/package/eslint-restricted-globals)\n\n> A list of confusing globals that should be restricted to be used as globals\n\n## Install\n\n```\n$ npm install --save eslint-restricted-globals\n```\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` etc. \nAnd because eslint thinks of them as valid global variables, it does not warn in case of bugs.\n\nFor eg:\n```js\nfunction foo(nama) {\n    if (nama) {\n        console.log(name)\n    }\n}\n```\n\nHere we try to log variable `nama` if it is truthy, but by mistake we are logging `name` and as `name` is a valid global, no eslint warning is shown.\n\nTo avoid this, we blacklist such confusing globals which are exported from this package. It contains the list of variables that we think should not be used without `window.` qualifier. But as this is just a javascript array you can add, remove variables or even make your own list of variables.\n\n## Usage\n\nAdd this in your eslint config in rules property:\n\n```js\nvar restrictedGlobals = require('eslint-restricted-globals')\n\nmodule.exports = {\n    rules: {\n        'no-restricted-globals': ['error'].concat(restrictedGlobals),\n    }\n}\n```\n\n\n## License\n\nMIT","users":{}}