{"name":"eslint-plugin-no-only-tests","version":"2.4.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.4.0","homepage":"https://github.com/levibuzolic/no-only-tests#readme","bugs":{"url":"https://github.com/levibuzolic/no-only-tests/issues"},"dist":{"shasum":"7d565434aa7d16ccc7eea957c391d98f827332ca","tarball":"http://registry-npm.ywwl.com/eslint-plugin-no-only-tests/download/eslint-plugin-no-only-tests-2.4.0.tgz","fileCount":8,"integrity":"sha512-azP9PwQYfGtXJjW273nIxQH9Ygr+5/UyeW2wEjYoDtVYPI+WPKwbj0+qcAKYUXFZLRumq4HKkFaoDBAwBoXImQ==","signatures":[{"sig":"MEYCIQCs6F0Tb0yjisZbLKmPmyMqgnxm150Dx1jEo8oD2yiP6wIhAL8TZ55Aei8Vtx2tuPtKtu5PZSvarksc6zWAwrIXYVO3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5xH7CRA9TVsSAnZWagAAlQEP/At8IbV7GYLLGas5UWwd\n511sSiVA0HGq1K3RXlf28Fq5rg7XBdzlPgZdju1ef4yzvcqyRbMyUreO+8sp\nkhNqn3eutrkeassG0FQ25AUcXnA7fhLpjM9R+Nnr5rKp1I9jxryIAIHY5X79\nbQdbOIAmmhMHOe+Qt85TpmF0RDopN1z45Hi/NGq+gyIT2QKgQvITC5O2YEwo\nrQbN7yHxRQuhX3DmQ25jq5M7/hNCQmGeKw7pC09XwTWBgVjhXcpzLVfmliLv\npF4nHCMKKg2itof1Kd4PWTTrKQyI/PF3+U7mlBgOLN61Nvbu9/atLWiCiQU8\nRaFrWMUJgwbIyMaUvgtzkOQzL3MCH7um764CkVCTjp8LhiVGP/ESlNinH399\nd2zL+0G4f7PWsCiaHJKcCYFh7HHPwEeXvmp5WbbhPw3/6uEQ/Y29HZVCNr0s\n9kOPDmN0j/U0f/+3lZuwnRgsKTAwgwbV+U9IIk0cv1doduM3CSVZ637oN2mH\ndmWQKU4GbmABn9y6YfQ1IWtSruyd85hU1nKq6Fa1XI6liG3sN4L+nRkLXR4C\nfVFPQYNVM2DqnksY9jJ36wAG6D6PBjUy/PPfQDseroMhIvoE/BIU9viqwhcs\nY4XCwEZj+PBi02F5daQklwWTguP56Ip/JPrZIPg3v0TEpb1kYFleoF983c01\nC3iO\r\n=pdU9\r\n-----END PGP SIGNATURE-----\r\n","size":3634,"noattachment":false,"key":"/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.4.0.tgz"},"main":"index.js","engines":{"node":">=4.0.0"},"gitHead":"b255d9a9f6b0238002f0dc5ba3b08a56d0f51adb","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.4.1","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.4.0_1575424506998_0.32761664166222126","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":1575424507152,"maintainers":[{"name":"levibuzolic","email":"levibuzolic@gmail.com"}],"_cnpm_publish_time":1575424507152,"dist-tags":{"latest":"3.4.0"}}