{"id":13801899,"url":"https://github.com/tlvince/eslint-plugin-jasmine","last_synced_at":"2025-05-16T07:07:05.776Z","repository":{"id":17967130,"uuid":"20961216","full_name":"tlvince/eslint-plugin-jasmine","owner":"tlvince","description":"ESLint rules for Jasmine","archived":false,"fork":false,"pushed_at":"2024-10-14T14:09:44.000Z","size":695,"stargazers_count":97,"open_issues_count":75,"forks_count":57,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-10T00:34:23.561Z","etag":null,"topics":["eslint","eslint-plugin-jasmine","jasmine"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-plugin-jasmine","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tlvince.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tlvince"}},"created_at":"2014-06-18T12:29:00.000Z","updated_at":"2025-05-06T13:25:21.000Z","dependencies_parsed_at":"2024-01-02T23:43:17.227Z","dependency_job_id":"0ae7fd7a-ea24-4eea-b967-d46d43035916","html_url":"https://github.com/tlvince/eslint-plugin-jasmine","commit_stats":{"total_commits":183,"total_committers":40,"mean_commits":4.575,"dds":0.6994535519125683,"last_synced_commit":"3d8081acf40df4ad056819d0dc77f00fbadc53b7"},"previous_names":["tlvince/eslint-no-exclusive-tests","tlvince/eslint-plugin-no-exclusive-tests"],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlvince%2Feslint-plugin-jasmine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlvince%2Feslint-plugin-jasmine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlvince%2Feslint-plugin-jasmine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlvince%2Feslint-plugin-jasmine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlvince","download_url":"https://codeload.github.com/tlvince/eslint-plugin-jasmine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485065,"owners_count":22078767,"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":["eslint","eslint-plugin-jasmine","jasmine"],"created_at":"2024-08-04T00:01:29.580Z","updated_at":"2025-05-16T07:07:00.766Z","avatar_url":"https://github.com/tlvince.png","language":"JavaScript","funding_links":["https://github.com/sponsors/tlvince"],"categories":["Plugins"],"sub_categories":["Testing Tools"],"readme":"# eslint-plugin-jasmine\n\n[![Build Status][build-image]][build-url]\n[![npm version][npm-image]][npm-url]\n[![License][license-image]][license-url]\n\n[build-url]: https://github.com/tlvince/eslint-plugin-jasmine/actions\n[build-image]: https://img.shields.io/github/actions/workflow/status/tlvince/eslint-plugin-jasmine/releases.yml\n[npm-url]: https://www.npmjs.com/package/eslint-plugin-jasmine\n[npm-image]: https://img.shields.io/npm/v/eslint-plugin-jasmine.svg\n[license-url]: https://opensource.org/licenses/MIT\n[license-image]: https://img.shields.io/npm/l/eslint-plugin-jasmine.svg\n\n\u003e ESLint rules for Jasmine\n\n## Usage\n\n### With an ESLint version starting from v9\n\n1. Install `eslint-plugin-jasmine` as a dev-dependency:\n\n   ```shell\n   npm install --save-dev eslint-plugin-jasmine\n   ```\n\n2. Enable the plugin, add its globals and the recommended rules to your ESLint configuration in `eslint.config.js`:\n\n   ```js\n   import js from '@eslint/js';\n   import jasmine from 'eslint-plugin-jasmine';\n   import globals from 'globals';\n\n   export default [\n       js.configs.recommended,\n       jasmine.configs.recommended,\n       {\n           languageOptions: {\n               globals: {\n                   ...globals.jasmine\n               }\n           },\n           plugins: {\n               jasmine\n           }\n       }\n   ];\n   ```\n\n### With an ESLint version lower than v9\n\n1. Install `eslint-plugin-jasmine` as a dev-dependency:\n\n   ```shell\n   npm install --save-dev eslint-plugin-jasmine\n   ```\n\n2. Enable the plugin by adding it to your `.eslintrc`:\n\n   ```yaml\n   plugins:\n     - jasmine\n   ```\n\nESLint itself provides a [Jasmine environment](https://eslint.org/docs/v8.x/use/configure/language-options) for Jasmine's global\nvariables. It's therefore recommended to also enable it in your `.eslintrc`:\n\n```yaml\nplugins:\n  - jasmine\nenv:\n  jasmine: true\n```\n\nBy default, no rules are enabled. See the next section for more.\n\n## Configuration\n\nThis plugin exports a `recommended` configuration that enforces good practices.\n\n**Using recommended configuration in ESLint version starting from v9:**\n\nAdd `jasmine.configs.recommended` to the default export array in `eslint.config.js`:\n```js\nexport default [\n  jasmine.configs.recommended,\n  /* rest of your config */\n];\n```\n\n**Using recommended configuration in ESLint version lower than v9:**\n\nUse the `extends` property in your `.eslintrc` config file:\n```yaml\nplugins:\n  - jasmine\nenv:\n  jasmine: true\nextends: \"plugin:jasmine/recommended\"\n```\n\nSee the [ESLint config docs][] for more information about extending\nconfiguration files.\n\n[eslint config docs]: http://eslint.org/docs/user-guide/configuring#extending-configuration-files\n\n### Rules\n\n| Rule                              | Recommended                        | Options                    |\n| --------------------------------- | ---------------------------------- | -------------------------- |\n| [expect-matcher][]                | 1,                                 |\n| [expect-single-argument][]        | 1,                                 |\n| [missing-expect][]                | 0, `'expect()'`, `'expectAsync()'` | expectation function names |\n| [named-spy][]                     | 0                                  |\n| [new-line-before-expect][]        | 1                                  |\n| [new-line-between-declarations][] | 1                                  |\n| [no-assign-spyon][]               | 0                                  |\n| [no-describe-variables][]         | 0                                  |\n| [no-disabled-tests][]             | 1                                  |\n| [no-expect-in-setup-teardown][]   | 1, `'expect()'`, `'expectAsync()'` | expectation function names |\n| [no-focused-tests][]              | 2                                  |\n| [no-global-setup][]               | 2                                  |\n| [no-pending-tests][]              | 1                                  |\n| [no-promise-without-done-fail][]  | 1                                  |\n| [no-spec-dupes][]                 | 1, `'block'`                       | `['block', 'branch']`      |\n| [no-suite-callback-args][]        | 2                                  |\n| [no-suite-dupes][]                | 1, `'block'`                       | `['block', 'branch']`      |\n| [no-unsafe-spy][]                 | 1                                  |\n| [valid-expect][]                  | `deprecated`                       |\n| [prefer-jasmine-matcher][]        | 1                                  |\n| [prefer-promise-strategies][]     | 1                                  |\n| [prefer-toHaveBeenCalledWith][]   | 1                                  |\n| [prefer-toBeUndefined][]          | 0                                  | `['always', 'never']`      |\n\nFor example, using the recommended configuration, the `no-focused-tests` rule\nis enabled and will cause ESLint to throw an error (with an exit code of `1`)\nwhen triggered.\n\n\n\n**Customizing rules in ESLint version starting from v9:**\n\nYou may customise each rule by ading them under a `rules` property in `eslint.config.js`:\n\n```js\nexport default [\n  {\n    rules: {\n      'jasmine/no-focused-tests': 0\n    }\n  },\n  /* rest of your config */\n];\n```\n\n**Customizing rules in ESLint version lower than v9:**\n\nYou may customise each rule by adding a value in your `.eslintrc` `rules`\nproperty:\n\n```yaml\nplugins:\n  - jasmine\nenv:\n  jasmine: true\nrules:\n  jasmine/no-focused-tests: 0\n  jasmine/no-suite-dupes:\n    - 2\n    - branch\n```\n\nSee [configuring rules][] for more information.\n\n[expect-matcher]: docs/rules/expect-matcher.md\n[expect-single-argument]: docs/rules/expect-single-argument.md\n[missing-expect]: docs/rules/missing-expect.md\n[named-spy]: docs/rules/named-spy.md\n[new-line-before-expect]: docs/rules/new-line-before-expect.md\n[new-line-between-declarations]: docs/rules/new-line-between-declarations.md\n[no-assign-spyon]: docs/rules/no-assign-spyon.md\n[no-describe-variables]: docs/rules/no-describe-variables.md\n[no-disabled-tests]: docs/rules/no-disabled-tests.md\n[no-expect-in-setup-teardown]: docs/rules/no-expect-in-setup-teardown.md\n[no-focused-tests]: docs/rules/no-focused-tests.md\n[no-global-setup]: docs/rules/no-global-setup.md\n[no-pending-tests]: docs/rules/no-pending-tests.md\n[no-promise-without-done-fail]: docs/rules/no-promise-without-done-fail.md\n[no-spec-dupes]: docs/rules/no-spec-dupes.md\n[no-suite-callback-args]: docs/rules/no-suite-callback-args.md\n[no-suite-dupes]: docs/rules/no-suite-dupes.md\n[no-unsafe-spy]: docs/rules/no-unsafe-spy.md\n[valid-expect]: docs/rules/valid-expect.md\n[prefer-jasmine-matcher]: docs/rules/prefer-jasmine-matcher.md\n[prefer-promise-strategies]: docs/rules/prefer-promise-strategies.md\n[prefer-toHaveBeenCalledWith]: docs/rules/prefer-toHaveBeenCalledWith.md\n[prefer-toBeUndefined]: docs/rules/prefer-toBeUndefined.md\n[configuring rules]: http://eslint.org/docs/user-guide/configuring#configuring-rules\n\n## Author\n\n© 2016 - 2017 Tom Vincent \u003cgit@tlvince.com\u003e and [contributors][].\n\n[contributors]: https://github.com/tlvince/eslint-plugin-jasmine/graphs/contributors\n\n## License\n\nReleased under the [MIT license](http://tlvince.mit-license.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlvince%2Feslint-plugin-jasmine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlvince%2Feslint-plugin-jasmine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlvince%2Feslint-plugin-jasmine/lists"}