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 3.6.0 to 3.7.0

2

package.json
{
"name": "eslint-plugin-testing-library",
"version": "3.6.0",
"version": "3.7.0",
"description": "ESLint rules for Testing Library",

@@ -5,0 +5,0 @@ "keywords": [

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

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

@@ -220,2 +220,3 @@

<td align="center"><a href="http://aless.co"><img src="https://avatars0.githubusercontent.com/u/5139846?v=4" width="100px;" alt=""/><br /><sub><b>Alessia Bellisario</b></sub></a><br /><a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=alessbell" title="Code">💻</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=alessbell" title="Tests">⚠️</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=alessbell" title="Documentation">📖</a></td>
<td align="center"><a href="https://skovy.dev"><img src="https://avatars1.githubusercontent.com/u/5247455?v=4" width="100px;" alt=""/><br /><sub><b>Spencer Miskoviak</b></sub></a><br /><a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=skovy" title="Code">💻</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=skovy" title="Tests">⚠️</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=skovy" title="Documentation">📖</a></td>
</tr>

@@ -222,0 +223,0 @@ </table>

@@ -26,2 +26,3 @@ "use strict";

preferExplicitAssert: 'Wrap stand-alone `getBy*` query with `expect` function for better explicit assertion',
preferExplicitAssertAssertion: '`getBy*` queries must be asserted with `{{assertion}}`',
},

@@ -32,3 +33,7 @@ fixable: null,

type: 'object',
additionalProperties: false,
properties: {
assertion: {
type: 'string',
},
customQueryNames: {

@@ -48,3 +53,3 @@ type: 'array',

var options = _a[0];
var customQueryNames = options.customQueryNames;
var customQueryNames = options.customQueryNames, assertion = options.assertion;
var getQueryCalls = [];

@@ -68,2 +73,16 @@ return {

}
else if (assertion) {
var expectation = node.parent.parent.parent;
if (expectation.type === 'MemberExpression' &&
expectation.property.type === 'Identifier' &&
expectation.property.name !== assertion) {
context.report({
node: expectation.property,
messageId: 'preferExplicitAssertAssertion',
data: {
assertion: assertion,
},
});
}
}
});

@@ -70,0 +89,0 @@ },

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