Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/matanyadaev/eslint-plugin-testing

ESLint plugin for testing.
https://github.com/matanyadaev/eslint-plugin-testing

best-practices eslint eslint-plugin eslint-plugin-testing javascript nodejs test-best-practices testing

Last synced: 3 months ago
JSON representation

ESLint plugin for testing.

Awesome Lists containing this project

README

        

# eslint-plugin-testing

[![npm](https://img.shields.io/npm/v/eslint-plugin-testing)](https://www.npmjs.com/package/eslint-plugin-testing)
[![ci](https://github.com/MatanYadaev/eslint-plugin-testing/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/MatanYadaev/eslint-plugin-testing/actions/workflows/ci.yaml)

ESLint plugin for testing.

## Installation

1. First, install [ESLint](https://eslint.org/):

```sh
npm install --save-dev eslint
```

2. Next, install `eslint-plugin-testing`:

```sh
npm install --save-dev eslint-plugin-testing
```

## Usage

Add `testing` to the plugins section of your `.eslintrc` configuration file:

```json
{
"plugins": ["testing"]
}
```

Then configure the rules you want to use under the rules section.

```json
{
"rules": {
"testing/aaa-comments": "error"
}
}
```

### Recommended

To use the recommended configuration, extend it in your `.eslintrc` file:

```json
{
"extends": ["plugin:testing/recommended"]
}
```

All recommend rules will be set to error by default. You can however disable some rules by setting turning them `off` in your `.eslintrc` file or by setting them to `warn` in your `.eslintrc`.

### All

To use the all configuration, extend it in your `.eslintrc` file:

```json
{
"extends": ["plugin:testing/all"]
}
```

## Rules

💼 Configurations enabled in.\
⚠️ Configurations set to warn in.\
🌐 Set in the `all` configuration.\
✅ Set in the `recommended` configuration.

| Name | Description | 💼 | ⚠️ |
| :----------------------------------------- | :------------------- | :- | :- |
| [aaa-comments](docs/rules/aaa-comments.md) | Enforce AAA comments | ✅ | 🌐 |

## Licence

[MIT](https://github.com/MatanYadaev/eslint-plugin-testing/blob/main/LICENSE)

Copyright © 2023-present, Matan Yadaev