Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@funboxteam/eslint-plugin-no-only-tests

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@funboxteam/eslint-plugin-no-only-tests

Disallow the use of describe.only() and it.only()

  • 4.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

@funboxteam/eslint-plugin-no-only-tests

npm

Disallow the use of describe.only() and it.only().

По-русски

Rationale

When developers fix tests they may make the process easier by filtering tests using method only on it & describe.

However, such filters should not be in the repo when the project is running on CI. So, we add this rule to our ESLint config to check the existence of only in the tests files. And we run linter using precommit-hook, which make it possible to prevent committing when only does exist in the code.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install the plugin:

$ npm install @funboxteam/eslint-plugin-no-only-tests --save-dev

Usage

Add @funboxteam/eslint-plugin-no-only-tests to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "@funboxteam/no-only-tests"
    ]
}

Then configure the rule under the rules section.

{
    "rules": {
        "@funboxteam/no-only-tests/no-only": 2
    }
}

Sponsored by FunBox

Keywords

FAQs

Package last updated on 06 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc