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

eslint-plugin-testing-library

Package Overview
Dependencies
Maintainers
2
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-testing-library - npm Package Compare versions

Comparing version 1.5.0 to 2.0.0

lib/rules/await-async-utils.js

4

lib/index.js

@@ -5,2 +5,3 @@ 'use strict';

'await-async-query': require('./rules/await-async-query'),
'await-async-utils': require('./rules/await-async-utils'),
'await-fire-event': require('./rules/await-fire-event'),

@@ -11,3 +12,3 @@ 'consistent-data-testid': require('./rules/consistent-data-testid'),

'no-dom-import': require('./rules/no-dom-import'),
'prefer-expect-query-by': require('./rules/prefer-expect-query-by'),
'no-get-by-for-checking-element-not-present': require('./rules/no-get-by-for-checking-element-not-present'),
'prefer-explicit-assert': require('./rules/prefer-explicit-assert'),

@@ -18,2 +19,3 @@ };

'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-query': 'error',

@@ -20,0 +22,0 @@ };

@@ -16,3 +16,3 @@ 'use strict';

const getDocsUrl = ruleName =>
`https://github.com/Belco90/eslint-plugin-testing-library/tree/master/docs/rules/${ruleName}.md`;
`https://github.com/testing-library/eslint-plugin-testing-library/tree/master/docs/rules/${ruleName}.md`;

@@ -52,2 +52,9 @@ const SYNC_QUERIES_VARIANTS = ['getBy', 'getAllBy', 'queryBy', 'queryAllBy'];

const ASYNC_UTILS = [
'wait',
'waitForElement',
'waitForDomChange',
'waitForElementToBeRemoved',
];
module.exports = {

@@ -62,2 +69,3 @@ getDocsUrl,

ALL_QUERIES_COMBINATIONS,
ASYNC_UTILS,
};
{
"name": "eslint-plugin-testing-library",
"version": "1.5.0",
"version": "2.0.0",
"description": "ESLint rules for Testing Library",

@@ -17,7 +17,7 @@ "keywords": [

"type": "git",
"url": "https://github.com/Belco90/eslint-plugin-testing-library.git"
"url": "https://github.com/testing-library/eslint-plugin-testing-library.git"
},
"homepage": "https://github.com/Belco90/eslint-plugin-testing-library",
"homepage": "https://github.com/testing-library/eslint-plugin-testing-library",
"bugs": {
"url": "https://github.com/Belco90/eslint-plugin-testing-library/issues"
"url": "https://github.com/testing-library/eslint-plugin-testing-library/issues"
},

@@ -24,0 +24,0 @@ "main": "lib/index.js",

@@ -20,3 +20,2 @@ <div align="center">

[![PRs Welcome][pr-badge]][pr-url]
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)
<br>

@@ -27,2 +26,8 @@ [![Watch on Github][gh-watchers-badge]][gh-watchers-url]

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
## Installation

@@ -134,15 +139,16 @@

| Rule | Description | Configurations | Fixable |
| -------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------ |
| [await-async-query](docs/rules/await-async-query.md) | Enforce async queries to have proper `await` | ![recommended-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] | |
| [await-fire-event](docs/rules/await-fire-event.md) | Enforce async fire event methods to be awaited | ![vue-badge][] | |
| [no-await-sync-query](docs/rules/no-await-sync-query.md) | Disallow unnecessary `await` for sync queries | ![recommended-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] | |
| [no-debug](docs/rules/no-debug.md) | Disallow the use of `debug` | ![angular-badge][] ![react-badge][] ![vue-badge][] | |
| [no-dom-import](docs/rules/no-dom-import.md) | Disallow importing from DOM Testing Library | ![angular-badge][] ![react-badge][] ![vue-badge][] | ![fixable-badge][] |
| [prefer-expect-query-by](docs/rules/prefer-expect-query-by.md) | Disallow the use of `expect(getBy*)` | ![recommended-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] | |
| [prefer-explicit-assert](docs/rules/prefer-explicit-assert.md) | Suggest using explicit assertions rather than just `getBy*` queries | | |
| [consistent-data-testid](docs/rules/consistent-data-testid.md) | Ensure `data-testid` values match a provided regex. | | |
| Rule | Description | Configurations | Fixable |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------ |
| [await-async-query](docs/rules/await-async-query.md) | Enforce async queries to have proper `await` | ![recommended-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] | |
| [await-async-utils](docs/rules/await-async-utils.md) | Enforce async utils to be awaited properly | ![recommended-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] | |
| [await-fire-event](docs/rules/await-fire-event.md) | Enforce async fire event methods to be awaited | ![vue-badge][] | |
| [consistent-data-testid](docs/rules/consistent-data-testid.md) | Ensure `data-testid` values match a provided regex. | | |
| [no-await-sync-query](docs/rules/no-await-sync-query.md) | Disallow unnecessary `await` for sync queries | ![recommended-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] | |
| [no-debug](docs/rules/no-debug.md) | Disallow the use of `debug` | ![angular-badge][] ![react-badge][] ![vue-badge][] | |
| [no-dom-import](docs/rules/no-dom-import.md) | Disallow importing from DOM Testing Library | ![angular-badge][] ![react-badge][] ![vue-badge][] | ![fixable-badge][] |
| [no-get-by-for-checking-element-not-present](docs/rules/no-get-by-for-checking-element-not-present) | Disallow the use of `getBy*` queries when checking elements are not present | | |
| [prefer-explicit-assert](docs/rules/prefer-explicit-assert.md) | Suggest using explicit assertions rather than just `getBy*` queries | | |
[build-badge]: https://img.shields.io/travis/Belco90/eslint-plugin-testing-library?style=flat-square
[build-url]: https://travis-ci.org/belco90/eslint-plugin-testing-library
[build-badge]: https://img.shields.io/travis/testing-library/eslint-plugin-testing-library?style=flat-square
[build-url]: https://travis-ci.org/testing-library/eslint-plugin-testing-library
[version-badge]: https://img.shields.io/npm/v/eslint-plugin-testing-library?style=flat-square

@@ -191,4 +197,5 @@ [version-url]: https://www.npmjs.com/package/eslint-plugin-testing-library

<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
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