Huge News!Announcing our $40M Series B led by Abstract Ventures.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.23.0-dev.20210107 to 0.23.0-dev.20210108

2

package.json
{
"name": "@fimbul/mimir",
"version": "0.23.0-dev.20210107",
"version": "0.23.0-dev.20210108",
"description": "Core rules of the Fimbullinter project",

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

@@ -49,3 +49,5 @@ "use strict";

checkClassProperty(node, clazz) {
if (clazz.heritageClauses === undefined)
if (clazz.heritageClauses === undefined ||
node.name.kind === ts.SyntaxKind.PrivateIdentifier ||
tsutils_1.hasModifier(node.modifiers, ts.SyntaxKind.StaticKeyword))
return;

@@ -52,0 +54,0 @@ const checker = this.checker;

@@ -90,2 +90,3 @@ "use strict";

}
// TODO unique symbol
}

@@ -92,0 +93,0 @@ return Array.from(result);

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

}
else if (t.flags & ts.TypeFlags.String) {
else if (t.flags & ts.TypeFlags.StringLike) {
result.string = undefined;

@@ -117,0 +117,0 @@ seenString = true;

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

function signatureToString(signature, checker, _, node) {
var _a;
let construct = false;
switch (signature.declaration && signature.declaration.kind) {
switch ((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) {
case ts.SyntaxKind.Constructor:

@@ -131,0 +132,0 @@ case ts.SyntaxKind.ConstructSignature:

@@ -40,2 +40,3 @@ "use strict";

node.initializer === undefined &&
node.type !== undefined &&
!utils_1.isAmbientVariableDeclaration(node) && (!tsutils_1.isStrictCompilerOptionEnabled(this.context.compilerOptions, 'strictNullChecks') ||

@@ -50,2 +51,3 @@ // type does not allow undefined

node.initializer === undefined &&
node.type !== undefined &&
!utils_1.isAmbientPropertyDeclaration(node) &&

@@ -52,0 +54,0 @@ !tsutils_1.hasModifier(node.modifiers, ts.SyntaxKind.AbstractKeyword, ts.SyntaxKind.StaticKeyword) && (

@@ -200,2 +200,3 @@ "use strict";

return 'null';
// TODO unique symbol
}

@@ -202,0 +203,0 @@ return;

@@ -9,4 +9,3 @@ import { TypedRule } from '@fimbul/ymir';

private isArrayLike;
private isDeclaredInDefaultLib;
private isIterable;
}

@@ -8,3 +8,2 @@ "use strict";

const tsutils_1 = require("tsutils");
const path = require("path");
const utils_1 = require("../utils");

@@ -56,3 +55,3 @@ let Rule = class Rule extends ymir_1.TypedRule {

if (type.symbol !== undefined && /^(Concat|Readonly)?Array$/.test(type.symbol.escapedName) &&
type.symbol.declarations !== undefined && type.symbol.declarations.some(this.isDeclaredInDefaultLib, this))
type.symbol.declarations !== undefined && type.symbol.declarations.some((node) => node.getSourceFile().hasNoDefaultLib))
return true;

@@ -64,7 +63,2 @@ if (tsutils_1.isIntersectionType(type))

}
isDeclaredInDefaultLib(node) {
// we assume it's the global array type if it comes from any lib.xxx.d.ts file
return path.normalize(path.dirname(node.getSourceFile().fileName))
=== path.dirname(ts.getDefaultLibFilePath(this.context.compilerOptions));
}
isIterable(type, node) {

@@ -71,0 +65,0 @@ const indexType = type.getNumberIndexType() || type.getStringIndexType();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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