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

tslint-eslint-rules

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint-eslint-rules - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

dist/rules/blockSpacingRule.js

6

dist/rules/noInnerDeclarationsRule.js

@@ -45,6 +45,6 @@ "use strict";

var body = this.nearestBody(node);
var isValid = (body.kind === ts.SyntaxKind.SourceFile && body.distance === 1) || body.distance === 2;
var isValid = (body.isSourceFile && body.distance === 1) || body.distance === 2;
if (!isValid) {
var decl = node.kind === ts.SyntaxKind.FunctionDeclaration ? 'function' : 'variable';
var root = body.kind === ts.SyntaxKind.SourceFile ? 'program' : 'function body';
var root = body.isSourceFile ? 'program' : 'function body';
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "move " + decl + " declaration to " + root + " root"));

@@ -61,3 +61,3 @@ }

return {
kind: ancestor.kind,
isSourceFile: (ancestor && ancestor.kind === ts.SyntaxKind.SourceFile) || !ancestor,
distance: generation

@@ -64,0 +64,0 @@ };

{
"name": "tslint-eslint-rules",
"version": "1.2.0",
"version": "1.3.0",
"description": "Improve your TSLint with the missing ESLint Rules",

@@ -5,0 +5,0 @@ "main": "index.js",

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