{"id":45341742,"url":"https://github.com/wentout/eslint-plugin-no-arrow-this","last_synced_at":"2026-02-21T10:32:51.750Z","repository":{"id":57230020,"uuid":"143911019","full_name":"wentout/eslint-plugin-no-arrow-this","owner":"wentout","description":"eslint plugin for warning \"this\" inside of arrow functions","archived":false,"fork":false,"pushed_at":"2019-01-30T22:58:38.000Z","size":16,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T09:10:54.101Z","etag":null,"topics":["es6","eslint-plugin","eslint-rules","eslintplugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-plugin-no-arrow-this","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wentout.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-07T18:17:50.000Z","updated_at":"2019-01-30T22:58:40.000Z","dependencies_parsed_at":"2022-09-11T07:00:11.811Z","dependency_job_id":null,"html_url":"https://github.com/wentout/eslint-plugin-no-arrow-this","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wentout/eslint-plugin-no-arrow-this","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wentout%2Feslint-plugin-no-arrow-this","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wentout%2Feslint-plugin-no-arrow-this/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wentout%2Feslint-plugin-no-arrow-this/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wentout%2Feslint-plugin-no-arrow-this/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wentout","download_url":"https://codeload.github.com/wentout/eslint-plugin-no-arrow-this/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wentout%2Feslint-plugin-no-arrow-this/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T09:33:50.764Z","status":"ssl_error","status_checked_at":"2026-02-21T09:33:19.949Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es6","eslint-plugin","eslint-rules","eslintplugin"],"created_at":"2026-02-21T10:32:51.640Z","updated_at":"2026-02-21T10:32:51.741Z","avatar_url":"https://github.com/wentout.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-no-arrow-this\n\n## Proposal\n\nThis is a [eslint](https://eslint.org/) plugin for warning \"this\" keyword inside of arrow functions. The key is about to get rid of using `this` in sort of `global` context.\n\nFor example, you have a code with regular function:\n\n```javascript\n(function () {\n  var me = this;\n  console.log(me);\n}.bind(123))();\n```\n\nAnd then, somehow, may be after re-factoring, you will change that [**regular function**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) to [**arrow function**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions):\n\n```javascript\n(() =\u003e {\n  var me = this;\n  console.log(me);\n}).bind(123)();\n\n```\n\nSo, starting from that pont __`me`__ no longer follows to the binded context, and receives **`global`** or **`window`** instead.\n\nThis plugin will help you to find this conditions.\n\n\n## Example .eslintrc configuration\n\n### installation\n```bash\n$ npm i eslint-plugin-no-arrow-this\n```\n\n### typical config *for everything*\n```javascript\n\"plugins\": [\n  // ... other plugins\n  \"eslint-plugin-no-arrow-this\"\n],\n// ... other stuff\n\"rules\": {\n  // ... other rules\n  \"no-arrow-this/no-arrow-this\": \"warn\"\n}\n```\nSo far here you will receive warning on `eslint`.\n\n### How to check ONLY global~window context mess\n```javascript\n  \"no-arrow-this/no-arrow-this\": [\"warn\", {\n    onlyGlobals : true\n  }]\n```\n\n## to play with this rule\non [astexplorer.net](https://astexplorer.net/#/gist/1b0e7979d799635ae74f6bb15acf6c5a/a83c95146598f1ad828646ac71d556a8a5a8b839)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwentout%2Feslint-plugin-no-arrow-this","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwentout%2Feslint-plugin-no-arrow-this","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwentout%2Feslint-plugin-no-arrow-this/lists"}