eslint-plugin-jest-formatting
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -17,3 +17,5 @@ /** | ||
const isDescribe = node => | ||
node.expression && node.expression.callee.name === "describe"; | ||
node.expression && | ||
node.expression.callee && | ||
node.expression.callee.name === "describe"; | ||
@@ -35,5 +37,10 @@ module.exports = { | ||
create(context) { | ||
const filePath = context && context.getFilename(); | ||
const isTest = | ||
filePath.includes("test") || | ||
filePath.includes("spec") || | ||
filePath.includes("<input>"); | ||
return { | ||
ExpressionStatement(node) { | ||
if (!isDescribe(node)) { | ||
if (!isTest || !isDescribe(node)) { | ||
return; | ||
@@ -40,0 +47,0 @@ } |
{ | ||
"name": "eslint-plugin-jest-formatting", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Formatting rules for test written with jest", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
167897
398