{"name":"eslint-plugin-no-only-tests","version":"2.2.0","keywords":["eslint","eslintplugin","eslint-plugin","mocha","rule","only","describe","it","fixture"],"author":{"name":"Levi Buzolic"},"license":"MIT","_id":"eslint-plugin-no-only-tests@2.2.0","homepage":"https://github.com/levibuzolic/no-only-tests#readme","bugs":{"url":"https://github.com/levibuzolic/no-only-tests/issues"},"dist":{"shasum":"121691624c6c5baf930edc71ccd1b0545fd7e4f2","tarball":"http://registry-npm.ywwl.com/eslint-plugin-no-only-tests/download/eslint-plugin-no-only-tests-2.2.0.tgz","fileCount":6,"integrity":"sha512-A+CU7UPtJqQ74n4IPCsyoyfq6l37q98PsKkACo4wYkVSAnwYqpXBsSdhb3z84kxJBrrzRyYBNwELFgKDREV/Tg==","signatures":[{"sig":"MEQCIDCcOMNlVC8P6+WXwY8tfymM6x2qp0FjCU2wRmwFplPtAiBL8NIga+cOVsQK9QbqLMfnYyVRZc2xJLsxPBI1UYtIUw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpYGVCRA9TVsSAnZWagAAJPsP/11aQhJa5Go4EVz+Vh3W\nERlPr4OYtm07bbhU9Qhwf4oj8ZuBqwlarJf3OTejPWUYRS2FlYZUcoIYlodA\nJtG76SI/JbtyOWEQMQWzXee4hu/fMbAfIbxzPQU/JvZFP+HRlogMdsW6YmsB\nf5pwr3+ctvJl5xEzKE7KlnC7a8rixq8WdeuuZvf4DJCqQE08SnO3tAz3W1qJ\naEiq7Z/cZGy3Ioq75Akd0DzWQYnQB9qooygw4iH/Oc6+MSwZ7tW2WbFVzZsL\nJq6aG0vyWGSXtzmHCH4Qi4c+fFgZdtZ8ogzZ8XMyKgdhosPkJtkZ/DN9DU2e\nacXOH5e+tR/P0jK4H2dUwIBXsKVzOS/M/SEdIK7PTDHwQDrac9mPSil+hV+k\n2xsQgysWc5EjR7aBg0xKCu44MJiQirktGpNmvlPM326zclEwUOcoNh1C5wc5\nMS1n6sYKXvOcqcWhT0a1NrEm4mYwGHmxuXPpVSYPnRbU5fN611XBEwU1oZcw\nBuvfRgi+d0T8IvecCyv1TNKEgB7Obr3yq/3gGgB1elozCNVjiP1ht+UT9Rnh\nBHfhe6g8rkJPKnon6QhQKRVt8styNrssFY/9rTe18R3+GUk79zfqaBKcD7bE\n0ijiWCt3zgZ7IFt7L50RD6i0zt/Cj2orW1X5U/7/ivUQzqxQxQ3RvExgcCDy\n8otf\r\n=0SKs\r\n-----END PGP SIGNATURE-----\r\n","size":2470,"noattachment":false,"key":"/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.2.0.tgz"},"main":"index.js","engines":{"node":">=4.0.0"},"gitHead":"13c5cbe67aa85b263eaf206aecaf86b903c34603","scripts":{"test":"node tests.js"},"_npmUser":{"name":"levibuzolic","email":"levibuzolic@gmail.com"},"repository":{"url":"git+ssh://git@github.com/levibuzolic/eslint-plugin-no-only-tests.git","type":"git"},"_npmVersion":"6.7.0","description":"ESLint rule for .only blocks in mocha tests","directories":{},"_nodeVersion":"10.15.0","_hasShrinkwrap":false,"devDependencies":{"eslint":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-no-only-tests_2.2.0_1554350484541_0.5256564404191926","host":"s3://npm-registry-packages"},"readme":"# eslint-plugin-no-only-tests\n\n[![Version](https://img.shields.io/npm/v/eslint-plugin-no-only-tests.svg)](https://www.npmjs.com/package/eslint-plugin-no-only-tests) [![Downloads](https://img.shields.io/npm/dm/eslint-plugin-no-only-tests.svg)](https://npmcharts.com/compare/eslint-plugin-no-only-tests?minimal=true) [![GitHub Tests](https://github.com/levibuzolic/eslint-plugin-no-only-tests/workflows/Tests/badge.svg)](https://github.com/levibuzolic/eslint-plugin-no-only-tests/actions?query=workflow%3ATests)\n\nESLint rule for `.only` tests in [Mocha](https://mochajs.org/), [Jest](https://jestjs.io/), [Jasmine](https://jasmine.github.io/), [Mocha Cakes 2](https://github.com/iensu/mocha-cakes-2) and other JS testing libraries.\n\nThe following test blocks are matched by default: `describe`, `it`, `context`, `tape`, `test`, `fixture`, `serial`, `Feature`, `Scenario`, `Given`, `And`, `When` and `Then`.\n\nDesigned to prevent you from committing focused (`.only`) tests to CI, which may prevent your entire test suite from running.\n\nIf the testing framework you use doesn't use `.only` to focus tests, you can override the matchers with [options](#options).\n\n## Installation\n\n[Install ESLint](https://eslint.org/docs/user-guide/getting-started) if you haven't done so already, then install `eslint-plugin-no-only-tests`:\n\n```bash\nnpm install --save-dev eslint-plugin-no-only-tests\n# or\nyarn add --dev eslint-plugin-no-only-tests\n```\n\n> **Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-no-only-tests` globally.\n\n## Usage\n\nAdd `no-only-tests` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```json\n\"plugins\": [\n  \"no-only-tests\"\n]\n```\n\nThen add the rule to the rules section of your `.eslintrc`:\n\n```json\n\"rules\": {\n  \"no-only-tests/no-only-tests\": \"error\"\n}\n```\n\nIf you use a testing framework that uses a test block name that isn't present in the [defaults](#options), or a different way of focusing test (something other than `.only`) you can specify an array of blocks and focus methods to match in the options.\n\n```json\n\"rules\": {\n  \"no-only-tests/no-only-tests\": [\n    \"error\", {\n      \"block\": [\"test\", \"it\", \"assert\"],\n      \"focus\": [\"only\", \"focus\"]\n    }\n  ]\n}\n```\n\nThe above example will catch any uses of `test.only`, `test.focus`, `it.only`, `it.focus`, `assert.only` and `assert.focus`.\n\nThis rule supports opt-in autofixing when the `fix` option is set to `true` to avoid changing runtime code unintentionally when configured in an editor.\n\n```json\n\"rules\": {\n  \"no-only-tests/no-only-tests\": [\"error\", {\"fix\": true}]\n}\n```\n\n## Options\n\n| Option      | Type       | Description                                                                                                                                                                                                                                                                                                   |\n| ----------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `block`     | `string[]` | Specify the block names that your testing framework uses. Add a `*` to the end of any string to enable prefix matching (ie. `test*` will match `testExample.only`)<br>Defaults to `[\"describe\", \"it\", \"context\", \"test\", \"tape\", \"fixture\", \"serial\", \"Feature\", \"Scenario\", \"Given\", \"And\", \"When\", \"Then\"]` |\n| `focus`     | `string[]` | Specify the focus scope that your testing framework uses.<br>Defaults to `[\"only\"]`                                                                                                                                                                                                                           |\n| `functions` | `string[]` | Specify not permitted functions. Good examples are `fit` or `xit`.<br>Defaults to `[]` (disabled)                                                                                                                                                                                                             |\n| `fix`       | `boolean`  | Enable this rule to auto-fix violations, useful for a pre-commit hook, not recommended for users with auto-fixing enabled in their editor.<br>Defaults to `false`                                                                                                                                             |\n","publish_time":1554350484713,"maintainers":[{"name":"levibuzolic","email":"levibuzolic@gmail.com"}],"_cnpm_publish_time":1554350484713,"dist-tags":{"latest":"3.4.0"}}