eslint-plugin-relay
Advanced tools
Comparing version
{ | ||
"name": "eslint-plugin-relay", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "ESLint plugin for Relay.", | ||
@@ -5,0 +5,0 @@ "main": "eslint-plugin-relay", |
@@ -100,2 +100,5 @@ /** | ||
const options = getOptions(context.options[0]); | ||
if (!propType.properties) { | ||
console.log(propType); | ||
} | ||
const propTypeProperty = propType.properties.find(property => { | ||
@@ -378,15 +381,17 @@ // HACK: Type annotations don't currently expose a 'key' property: | ||
} | ||
const lintResults = objectTypes.map(objectType => | ||
validateObjectTypeAnnotation( | ||
context, | ||
Component, | ||
importedPropType, | ||
propName, | ||
objectType, | ||
importFixRange, | ||
true // Return false if invalid instead of reporting | ||
) | ||
const lintResults = objectTypes.map( | ||
objectType => | ||
objectType.type === 'ObjectTypeAnnotation' && | ||
validateObjectTypeAnnotation( | ||
context, | ||
Component, | ||
importedPropType, | ||
propName, | ||
objectType, | ||
importFixRange, | ||
true // Return false if invalid instead of reporting | ||
) | ||
); | ||
if (lintResults.some(result => result)) { | ||
// One of the intersected bojects has it right | ||
// One of the intersected ojects has it right | ||
break; | ||
@@ -393,0 +398,0 @@ } |
35119
0.49%920
0.55%