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

@magicspace/tslint-rules

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magicspace/tslint-rules - npm Package Compare versions

Comparing version 0.1.20 to 0.1.21

bld/rules/importPathBeSmartRule.js

11

bld/rules/emptyLineAroundBlocksRule.js

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

tsutils_1.isLabeledStatement,
isMultilineReturnStatement,
tsutils_1.isFunctionDeclaration,

@@ -53,3 +54,3 @@ tsutils_1.isClassDeclaration,

if (tsutils_1.isConstructorDeclaration(node)) {
this.walkContructorDeclaration(node);
this.walkConstructorDeclaration(node);
}

@@ -83,3 +84,3 @@ else if (tsutils_1.isFunctionDeclaration(node) || tsutils_1.isMethodDeclaration(node)) {

}
walkContructorDeclaration(node) {
walkConstructorDeclaration(node) {
if (node.body) {

@@ -188,2 +189,8 @@ let firstSignature = getConstructorFirstSignature(node);

}
function isMultilineReturnStatement(node) {
if (tsutils_1.isReturnStatement(node) && node.getText().indexOf('\n') !== -1) {
return true;
}
return false;
}
function getParentSyntaxList(node) {

@@ -190,0 +197,0 @@ let parent = node.parent;

@@ -130,2 +130,4 @@ "use strict";

typescript_1.isTemplateSpan(parent) ||
// new Foo(() => {})
typescript_1.isNewExpression(parent) ||
// foo.bar = () => {};

@@ -132,0 +134,0 @@ (typescript_1.isBinaryExpression(parent) &&

25

bld/rules/importGroupsRule.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Path = tslib_1.__importStar(require("path"));
const resolve_1 = tslib_1.__importDefault(require("resolve"));
const tslint_1 = require("tslint");
const tsutils_1 = require("tsutils");
const TypeScript = tslib_1.__importStar(require("typescript"));
const match_1 = require("../utils/match");
const path_1 = require("../utils/path");

@@ -16,22 +15,4 @@ const string_1 = require("../utils/string");

const BUILT_IN_MODULE_GROUP_TESTER_DICT = {
'$node-core'(path) {
try {
return require.resolve(path) === path;
}
catch (error) {
return false;
}
},
'$node-modules'(modulePath, sourceFilePath) {
let basedir = Path.dirname(sourceFilePath);
let resolvedPath;
try {
resolvedPath = resolve_1.default.sync(modulePath, { basedir });
}
catch (error) {
return false;
}
let relativePath = Path.relative(basedir, resolvedPath);
return /[\\/]node_modules[\\/]/.test(relativePath);
},
'$node-core': match_1.matchNodeCore,
'$node-modules': match_1.matchNodeModules,
};

@@ -38,0 +19,0 @@ class ModuleGroup {

{
"name": "@magicspace/tslint-rules",
"version": "0.1.20",
"version": "0.1.21",
"description": "Custom TSLint rules for MagicSpace.",

@@ -5,0 +5,0 @@ "repository": "https://github.com/makeflow/magicspace.git",

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