{"name":"eslint-plugin-no-only-tests","version":"2.1.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.1.0","homepage":"https://github.com/levibuzolic/no-only-tests#readme","bugs":{"url":"https://github.com/levibuzolic/no-only-tests/issues"},"dist":{"shasum":"9050450bace6abbc457de894116141936fec68e7","tarball":"http://registry-npm.ywwl.com/eslint-plugin-no-only-tests/download/eslint-plugin-no-only-tests-2.1.0.tgz","fileCount":8,"integrity":"sha512-T02dNNDj7sKJNvH7YLKqgv4+BDupxKG4OgadF0AecDHrYTb9hlosxqCgZbFKt28C7Ueof6ziCtEh6rnPvN4YYA==","signatures":[{"sig":"MEUCIBALnG7o4fN5EcL0RTWLi05UK/Wo8lqBZWOXaM09VYOuAiEA19HxDgsQM47jHMIsrsL9CQ6quv2cWaNeQbZ5JOlEnEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/890CRA9TVsSAnZWagAAC1wP/2/MbYkcSFOOrh1HCiYA\nwfH36l1lc3Q3/5v9l84d6Uh5N1UZr+ypOeLvNF7dSzr43q+XdaGR98faPkRw\nAwzoC5/fauCGG6+LLVHFOm67Y7Mn0TO6ZNTQAtaIEDot8Szn8sFh2rcghQiH\n5z0c2xP7iuj44bg86PkwXEu+/mFNUel4ITtVWIQhW/gHGb6EWZ+KjzvGpujv\nzI3Ro2vdLnJnOXnH2Pvbx3YGFDUuex7rJTrW+v1DtrIYf1yYZOyR/u13wstp\njgI0VhSZovtviLrTw9LTqAY5SeDnR4hITlntpU7uEwKeAon0MjfT+8ygOzoz\nWpALWvS1CDkVeJaJqR6euDTUQwxb31swEEmivLKcU72iar+LCVMcvtVx6v/y\nKfDaj0O5p/+mAblP7pVRmjpi4helXIOo3EQ8Sg/oOAepw/hYWgs8F75q942k\njAxht5dLkYvppsUqw7wFWYrtiJHXZh3tIlZYOox22bdpqMh9SFMEFxMjJrBc\n0KZe8brVO0gnpn039nJjKmwjHjY3RCZ+wz18FH99R2dJ++5+JZQZ3X/cid9a\numgHE9oYeJ2QHJD1++Rovw/xTo2OLnaTxTS8CLMh9SWTb+BOsvcebr7feFE5\n1agyYmNedNWePH/DLF+zb2qNbDUtjFsZPwVZYL9+weCAsWGpvnl1EMLW0lCa\nUJVV\r\n=12V2\r\n-----END PGP SIGNATURE-----\r\n","size":2995,"noattachment":false,"key":"/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.1.0.tgz"},"main":"index.js","engines":{"node":">=4.0.0"},"gitHead":"0699fc95352ca9969f09cec4cf7d0070db8c121e","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":"5.6.0","description":"ESLint rule for .only blocks in mocha tests","directories":{},"_nodeVersion":"8.11.3","_hasShrinkwrap":false,"devDependencies":{"eslint":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-no-only-tests_2.1.0_1543491443673_0.5850832729920827","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":1543491443845,"maintainers":[{"name":"levibuzolic","email":"levibuzolic@gmail.com"}],"_cnpm_publish_time":1543491443845,"dist-tags":{"latest":"3.4.0"}}