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: 8 months ago
JSON representation
ESLint plugin for testing.
- Host: GitHub
- URL: https://github.com/matanyadaev/eslint-plugin-testing
- Owner: MatanYadaev
- License: mit
- Created: 2023-08-04T22:12:06.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-02T14:28:39.000Z (almost 3 years ago)
- Last Synced: 2024-10-11T17:22:23.419Z (over 1 year ago)
- Topics: best-practices, eslint, eslint-plugin, eslint-plugin-testing, javascript, nodejs, test-best-practices, testing
- Language: TypeScript
- Homepage: https://github.com/MatanYadaev/eslint-plugin-testing
- Size: 159 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-testing
[](https://www.npmjs.com/package/eslint-plugin-testing)
[](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