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

dtslint

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtslint - npm Package Compare versions

Comparing version 0.5.6 to 0.5.7

2

bin/rules/dtHeaderRule.js

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

};
if (!util_1.isMainFile(sourceFile.fileName)) {
if (!util_1.isMainFile(sourceFile.fileName, /*allowNested*/ true)) {
lookFor("// Type definitions for", "Header should only be in `index.d.ts` of the root.");

@@ -32,0 +32,0 @@ lookFor("// TypeScript Version", "TypeScript version should be specified under header in `index.d.ts`.");

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

};
if (util_1.isMainFile(sourceFile.fileName)) {
if (util_1.isMainFile(sourceFile.fileName, /*allowNested*/ false)) {
try {

@@ -32,0 +32,0 @@ critic(sourceFile.fileName);

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

exports.mapDefinedAsync = mapDefinedAsync;
function isMainFile(fileName) {
function isMainFile(fileName, allowNested) {
// Linter may be run with cwd of the package. We want `index.d.ts` but not `submodule/index.d.ts` to match.

@@ -118,3 +118,3 @@ if (fileName === "index.d.ts") {

// Note a types redirect `foo/ts3.1` should not have its own header.
if (/^v\d+$/.test(path_1.basename(parent))) {
if (allowNested && /^v\d+$/.test(path_1.basename(parent))) {
parent = path_1.dirname(parent);

@@ -121,0 +121,0 @@ }

{
"name": "dtslint",
"version": "0.5.6",
"version": "0.5.7",
"description": "Runs tests on TypeScript definition files",

@@ -5,0 +5,0 @@ "files": [

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