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

eslint-plugin-jest

Package Overview
Dependencies
Maintainers
11
Versions
326
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jest - npm Package Compare versions

Comparing version 27.2.0 to 27.2.1

2

docs/rules/no-if.md
# Disallow conditional logic (`no-if`)
❌ This rule is deprecated. It was replaced by
[`jest/no-conditional-in-test`](../../docs/rules/no-conditional-in-test.md).
[`jest/no-conditional-in-test`](no-conditional-in-test.md).

@@ -6,0 +6,0 @@ <!-- end auto-generated rule header -->

@@ -20,14 +20,5 @@ "use strict";

const excludedFiles = ['__tests__', 'detectJestVersion', 'utils'];
const rules = (0, _fs.readdirSync)(rulesDir).map(rule => (0, _path.parse)(rule).name).filter(rule => !excludedFiles.includes(rule)).reduce((acc, curr) => ({
...acc,
[curr]: importDefault((0, _path.join)(rulesDir, curr))
}), {});
const recommendedRules = Object.entries(rules).filter(([, rule]) => rule.meta.docs.recommended).reduce((acc, [name, rule]) => ({
...acc,
[`jest/${name}`]: rule.meta.docs.recommended
}), {});
const allRules = Object.entries(rules).filter(([, rule]) => !rule.meta.deprecated).reduce((acc, [name]) => ({
...acc,
[`jest/${name}`]: 'error'
}), {});
const rules = Object.fromEntries((0, _fs.readdirSync)(rulesDir).map(rule => (0, _path.parse)(rule).name).filter(rule => !excludedFiles.includes(rule)).map(rule => [rule, importDefault((0, _path.join)(rulesDir, rule))]));
const recommendedRules = Object.fromEntries(Object.entries(rules).filter(([, rule]) => rule.meta.docs.recommended).map(([name, rule]) => [`jest/${name}`, rule.meta.docs.recommended]));
const allRules = Object.fromEntries(Object.entries(rules).filter(([, rule]) => !rule.meta.deprecated).map(([name]) => [`jest/${name}`, 'error']));
const createConfig = rules => ({

@@ -34,0 +25,0 @@ plugins: ['jest'],

@@ -53,3 +53,3 @@ "use strict";

const [firstArg] = node.argument.arguments;
if (firstArg.type === _utils.AST_NODE_TYPES.ArrayExpression && firstArg.elements.some(nod => (0, _utils2.isIdentifier)(nod, name))) {
if (firstArg.type === _utils.AST_NODE_TYPES.ArrayExpression && firstArg.elements.some(nod => nod && (0, _utils2.isIdentifier)(nod, name))) {
return true;

@@ -71,6 +71,6 @@ }

for (const element of elements) {
if (element.type === _utils.AST_NODE_TYPES.AwaitExpression && (0, _utils2.isIdentifier)(element.argument, name)) {
if ((element === null || element === void 0 ? void 0 : element.type) === _utils.AST_NODE_TYPES.AwaitExpression && (0, _utils2.isIdentifier)(element.argument, name)) {
return true;
}
if (element.type === _utils.AST_NODE_TYPES.ArrayExpression && isValueAwaitedInElements(name, element.elements)) {
if ((element === null || element === void 0 ? void 0 : element.type) === _utils.AST_NODE_TYPES.ArrayExpression && isValueAwaitedInElements(name, element.elements)) {
return true;

@@ -77,0 +77,0 @@ }

{
"name": "eslint-plugin-jest",
"version": "27.2.0",
"version": "27.2.1",
"description": "ESLint rules for Jest",

@@ -131,3 +131,3 @@ "keywords": [

"eslint-remote-tester": "^3.0.0",
"eslint-remote-tester-repositories": "~0.0.5",
"eslint-remote-tester-repositories": "~1.0.0",
"husky": "^8.0.1",

@@ -134,0 +134,0 @@ "is-ci": "^3.0.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