{"name":"eslint-plugin-no-only-tests","version":"2.0.0","keywords":["eslint","eslintplugin","eslint-plugin","mocha","rule","only","describe","it"],"author":{"name":"Levi Buzolic"},"license":"MIT","_id":"eslint-plugin-no-only-tests@2.0.0","homepage":"https://github.com/levibuzolic/no-only-tests#readme","bugs":{"url":"https://github.com/levibuzolic/no-only-tests/issues"},"dist":{"shasum":"c76c29e973bb76f24c14e20fa87f1ff1f0c18d5f","tarball":"http://registry-npm.ywwl.com/eslint-plugin-no-only-tests/download/eslint-plugin-no-only-tests-2.0.0.tgz","integrity":"sha512-1huEDo1+Yu2thtdxxzkB0lfPlD1ltNqxyFAO4HfFjB5AVh7FCsAENtJtCjMXmUjyCKgeF1bTnDFJqpIWMkdZtA==","signatures":[{"sig":"MEQCICaHtMWIoy62UOuDUYnBSFe+kIRSvne6xqGACt2KppzfAiAwaAW+I4x/PfiKtvRdsjmfTQOxmsKJlDVG1i/ATwMRow==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2944,"noattachment":false,"key":"/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.0.0.tgz"},"main":"index.js","engines":{"node":">=4.0.0"},"gitHead":"49c8c4859296c9babd120c6c98a7272281f72629","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.0.3","description":"ESLint rule for .only blocks in mocha tests","directories":{},"_nodeVersion":"8.0.0","devDependencies":{"eslint":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-no-only-tests-2.0.0.tgz_1497403522815_0.8753860061988235","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":1497403522922,"maintainers":[{"name":"levibuzolic","email":"levibuzolic@gmail.com"}],"_cnpm_publish_time":1497403522922,"dist-tags":{"latest":"3.4.0"}}