New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fimbul/mimir

Package Overview
Dependencies
Maintainers
2
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fimbul/mimir - npm Package Compare versions

Comparing version 0.11.0-dev.20180607 to 0.11.0-dev.20180609

2

package.json
{
"name": "@fimbul/mimir",
"version": "0.11.0-dev.20180607",
"version": "0.11.0-dev.20180609",
"description": "Core rules of the Fimbullinter project",

@@ -5,0 +5,0 @@ "main": "recommended.yaml",

@@ -86,3 +86,7 @@ "use strict";

const contextualType = this.getSafeContextualType(node);
if (contextualType === undefined || !typesAreEqual(sourceType, contextualType, this.checker))
if (contextualType === undefined ||
contextualType.flags & (ts.TypeFlags.TypeVariable | ts.TypeFlags.Instantiable) ||
(contextualType.flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) === 0 &&
!typesAreEqual(sourceType, contextualType, this.checker) &&
!typesAreEqual(sourceType, tsutils_1.removeOptionalityFromType(this.checker, contextualType), this.checker))
return;

@@ -104,4 +108,14 @@ message = 'This assertion is unnecessary as the receiver accepts the original type of the expression.';

const parent = node.parent;
if (!tsutils_1.isCallExpression(parent) && !tsutils_1.isNewExpression(parent) || node === parent.expression)
return;
switch (parent.kind) {
case ts.SyntaxKind.CallExpression:
case ts.SyntaxKind.NewExpression:
if (node === parent.expression)
return;
break;
case ts.SyntaxKind.TemplateSpan:
case ts.SyntaxKind.JsxExpression:
break;
default:
return;
}
return this.checker.getContextualType(node);

@@ -108,0 +122,0 @@ }

Sorry, the diff of this file is not supported yet

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