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
3
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 5.0.6 to 5.1.0

2

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

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

@@ -23,7 +23,25 @@ "use strict";

},
schema: [],
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
presence: {
type: 'boolean',
},
absence: {
type: 'boolean',
},
},
},
],
type: 'suggestion',
},
defaultOptions: [],
create(context, _, helpers) {
defaultOptions: [
{
presence: true,
absence: true,
},
],
create(context, [{ absence = true, presence = true }], helpers) {
return {

@@ -45,6 +63,6 @@ 'CallExpression Identifier'(node) {

}
if (isPresenceAssert && !isPresenceQuery) {
if (presence && isPresenceAssert && !isPresenceQuery) {
context.report({ node, messageId: 'wrongPresenceQuery' });
}
else if (isAbsenceAssert && isPresenceQuery) {
else if (absence && isAbsenceAssert && isPresenceQuery) {
context.report({ node, messageId: 'wrongAbsenceQuery' });

@@ -51,0 +69,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