{"name":"eslint-plugin-no-only-tests","version":"3.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@3.2.0","homepage":"https://github.com/levibuzolic/no-only-tests#readme","bugs":{"url":"https://github.com/levibuzolic/no-only-tests/issues"},"dist":{"shasum":"a6355487a14f0ee44d3df0ad87d0191afb9d2c5e","tarball":"http://registry-npm.ywwl.com/eslint-plugin-no-only-tests/download/eslint-plugin-no-only-tests-3.2.0.tgz","fileCount":8,"integrity":"sha512-Z1Npxb3QhO9Zd9Wuxa+UUFPPB6aisx2LW2Ed+LDgnohqUum0axNu9cN5GXTiLSk8MM1Vxi2EvE9SKfnTdN+NrA==","signatures":[{"sig":"MEYCIQDUUt7w5Myw37cfdTsRfCYAd/+NkoKrrucLLDL6arsxOwIhAO1DyoxBFuoFXAbINPzPGjFIGF2Z9UhWi2iNRef0ArvV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11448,"size":4354,"noattachment":false,"key":"/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.2.0.tgz"},"main":"index.js","engines":{"node":">=5.0.0"},"scripts":{"test":"node tests.js"},"_npmUser":{"name":"levibuzolic","email":"levibuzolic@gmail.com"},"repository":{"url":"git@github.com:levibuzolic/eslint-plugin-no-only-tests.git","type":"git"},"description":"ESLint rule for .only blocks in mocha tests","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2016 Levi Buzolic\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"eslint":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-no-only-tests_3.2.0_1723719466802_0.31983515635663684","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":1723719466953,"maintainers":[{"name":"levibuzolic","email":"levibuzolic@gmail.com"}],"_cnpm_publish_time":1723719466953,"dist-tags":{"latest":"3.4.0"}}