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.2 to 0.1.3

bld/@lang.js.map

21

bld/rules/explicitReturnTypeRule.js

@@ -30,5 +30,2 @@ "use strict";

let cb = (node) => {
if (tsutils_1.isCallExpression(node)) {
return;
}
if ((tsutils_1.isArrowFunction(node) ||

@@ -38,3 +35,3 @@ tsutils_1.isFunctionDeclaration(node) ||

tsutils_1.isMethodDeclaration(node)) &&
!this.printType(node)) {
!this.missingType(node)) {
this.failureManager.append({

@@ -50,3 +47,3 @@ node,

}
printType(node) {
missingType(node) {
let { type } = node;

@@ -57,3 +54,15 @@ if (type) {

else if (node.parent) {
return this.printType(node.parent);
let parent = node.parent;
if (tsutils_1.isCallExpression(parent)) {
return true;
}
else if (parent.type) {
return true;
}
else if (tsutils_1.isReturnStatement(parent)) {
return this.missingType(parent);
}
else {
return false;
}
}

@@ -60,0 +69,0 @@ else {

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

const RELATIVE_PATH = /^(?:\.{1,2}[\\/])+/;
const ERROR_MESSAGE_BANNED_PARENT_IMPORT = 'Importing from parent directory is not allowed.';
const ERROR_MESSAGE_BANNED_PARENT_IMPORT = 'this module can not be imported, because it is imported from parent directory.';
class Rule extends tslint_1.Rules.AbstractRule {

@@ -20,3 +20,3 @@ apply(sourceFile) {

ruleName: 'no-parent-import',
description: '',
description: 'No additional parameters are required',
optionsDescription: '',

@@ -23,0 +23,0 @@ options: undefined,

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

ruleName: 'scoped-modules',
description: '',
description: 'No additional parameters are required',
optionsDescription: '',

@@ -38,0 +38,0 @@ options: undefined,

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

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

},
"files": [
"bld/**/*.js"
],
"peerDependencies": {

@@ -18,0 +15,0 @@ "tslint": "*",

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