{"id":14978389,"url":"https://github.com/junosuarez/eslint-plugin-promiseparams","last_synced_at":"2025-08-08T21:22:17.487Z","repository":{"id":57230140,"uuid":"46609161","full_name":"junosuarez/eslint-plugin-promiseparams","owner":"junosuarez","description":"Enforce standard parameter names for Promise constructors","archived":false,"fork":false,"pushed_at":"2016-01-22T17:51:04.000Z","size":12,"stargazers_count":4,"open_issues_count":1,"forks_count":17,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-07T13:16:03.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/junosuarez.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":"2015-11-21T09:30:24.000Z","updated_at":"2016-04-13T18:41:13.000Z","dependencies_parsed_at":"2022-09-14T14:50:41.744Z","dependency_job_id":null,"html_url":"https://github.com/junosuarez/eslint-plugin-promiseparams","commit_stats":null,"previous_names":["jden/eslint-plugin-promiseparams"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/junosuarez/eslint-plugin-promiseparams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Feslint-plugin-promiseparams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Feslint-plugin-promiseparams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Feslint-plugin-promiseparams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Feslint-plugin-promiseparams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junosuarez","download_url":"https://codeload.github.com/junosuarez/eslint-plugin-promiseparams/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Feslint-plugin-promiseparams/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264862737,"owners_count":23675036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-09-24T13:57:31.224Z","updated_at":"2025-07-11T17:34:20.370Z","avatar_url":"https://github.com/junosuarez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-promiseparams\n\nEnforce standard parameter names for Promise constructors\n\n [![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n [![travis-ci](https://travis-ci.org/jden/eslint-plugin-promiseparams.svg)](https://travis-ci.org/jden/eslint-plugin-promiseparams)\n[![npm version](https://badge.fury.io/js/eslint-plugin-promiseparams.svg)](https://www.npmjs.com/package/eslint-plugin-promiseparams)\n\n**Deprecated: please use [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise/) instead**\n\n## Rule\n\n### `promiseparams`\n\n#### Valid\n```js\nnew Promise(function (resolve) { ... })\nnew Promise(function (resolve, reject) { ... })\n```\n\n#### Invalid\n```js\n// incorrect order:\nnew Promise(function (reject, resolve) { ... })\n// non-standard parameter names:\nnew Promise(function (ok, fail) { ... })\n```\n\nEnsures that `new Promise()` is instantiated with the parameter names `resolve, reject` to avoid confusion with order such as `reject, resolve`. The Promise constructor uses the [RevealingConstructor pattern](https://blog.domenic.me/the-revealing-constructor-pattern/). Using the same parameter names as the language specification makes code more uniform and easier to understand.\n\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\n$ npm i eslint --save-dev\n```\n\nNext, install `eslint-plugin-promiseparams`:\n\n```\n$ npm install eslint-plugin-promiseparams --save-dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-promiseparams` globally.\n\n## Usage\n\nAdd `promiseparams` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```json\n{\n    \"plugins\": [\n        \"promiseparams\"\n    ]\n}\n```\n\n\nThen configure the rules you want to use under the rules section.\n\n```json\n{\n    \"rules\": {\n        \"promiseparams/promiseparams\": 2\n    }\n}\n```\n\n## Etc\n(c) MMXV jden \u003cjason@denizac.org\u003e - ISC license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Feslint-plugin-promiseparams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunosuarez%2Feslint-plugin-promiseparams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Feslint-plugin-promiseparams/lists"}