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

eslint-plugin-microsoft-typescript

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-microsoft-typescript - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

7

dist/rules/debug-assert.js

@@ -22,3 +22,4 @@ "use strict";

create: function (context) {
var isString = function (node) { return node.type === experimental_utils_1.AST_NODE_TYPES.Literal && typeof node.value === 'string'; };
var isArrowFunction = function (node) { return node.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression; };
var isStringLiteral = function (node) { return ((node.type === experimental_utils_1.AST_NODE_TYPES.Literal && typeof node.value === 'string') || node.type === experimental_utils_1.AST_NODE_TYPES.TemplateLiteral); };
var isDebugAssert = function (node) { return (node.object.type === experimental_utils_1.AST_NODE_TYPES.Identifier

@@ -35,3 +36,3 @@ && node.object.name === 'Debug'

var message1Node = args[1];
if (message1Node && !isString(message1Node)) {
if (message1Node && !isStringLiteral(message1Node)) {
context.report({ messageId: 'secondArgumentDebugAssertError', node: message1Node });

@@ -43,3 +44,3 @@ }

var message2Node = args[2];
if (message2Node && (!isString(message2Node) && message2Node.type !== experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression)) {
if (message2Node && (!isStringLiteral(message2Node) && !isArrowFunction(message2Node))) {
context.report({ messageId: 'thirdArgumentDebugAssertError', node: message2Node });

@@ -46,0 +47,0 @@ }

{
"name": "eslint-plugin-microsoft-typescript",
"version": "0.1.6",
"version": "0.1.7",
"description": "ESlint rules for TypeScript",

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

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