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

eslint-plugin-flowtype

Package Overview
Dependencies
Maintainers
1
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-flowtype - npm Package Compare versions

Comparing version 5.7.0 to 5.7.1

18

dist/rules/requireReadonlyReactProps.js

@@ -35,4 +35,5 @@ "use strict";

);
};
}; // type Props = {| +foo: string |}
const isReadOnlyObjectType = (node, {

@@ -59,6 +60,17 @@ useImplicitExactTypes

});
}; // type Props = {| +foo: string |} | {| +bar: number |}
const isReadOnlyObjectUnionType = (node, options) => {
if (!node || node.type !== 'UnionTypeAnnotation') {
return false;
}
return node.types.every(type => {
return isReadOnlyObjectType(type, options);
});
};
const isReadOnlyType = (node, options) => {
return node.right.id && reReadOnly.test(node.right.id.name) || isReadOnlyObjectType(node.right, options);
return node.right.id && reReadOnly.test(node.right.id.name) || isReadOnlyObjectType(node.right, options) || isReadOnlyObjectUnionType(node.right, options);
};

@@ -141,3 +153,3 @@

message: identifier.name + ' must be $ReadOnly',
node
node: identifier
});

@@ -144,0 +156,0 @@ reportedFunctionalComponents.push(identifier);

2

package.json

@@ -67,3 +67,3 @@ {

},
"version": "5.7.0"
"version": "5.7.1"
}

Sorry, the diff of this file is too big to display

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