eslint-plugin-testing-library
Advanced tools
Comparing version 5.0.6 to 5.1.0
{ | ||
"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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221757
3933