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.9 to 0.1.10

15

dist/rules/only-arrow-functions.js

@@ -26,6 +26,17 @@ "use strict";

},
defaultOptions: [{ allowNamedFunctions: false, allowDeclarations: false }],
defaultOptions: [{
allowNamedFunctions: false,
allowDeclarations: false,
}],
create: function (context, _a) {
var _b = _a[0], allowNamedFunctions = _b.allowNamedFunctions, allowDeclarations = _b.allowDeclarations;
var isThisParameter = function (node) { return (node.params.length && !!node.params.find(function (param) { return param.type === experimental_utils_1.AST_NODE_TYPES.Identifier && param.name === 'this'; })); };
var shouldIgnore = function (node) {
var parent = node.parent;
if (!parent) {
return false;
}
return node.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression
&& (parent.type === experimental_utils_1.AST_NODE_TYPES.Property || parent.type === experimental_utils_1.AST_NODE_TYPES.MethodDefinition);
};
var stack = [];

@@ -45,3 +56,3 @@ var enterFunction = function () {

}
if (allowNamedFunctions && node.id !== null) {
if ((allowNamedFunctions && node.id !== null) || shouldIgnore(node)) {
return;

@@ -48,0 +59,0 @@ }

2

package.json
{
"name": "eslint-plugin-microsoft-typescript",
"version": "0.1.9",
"version": "0.1.10",
"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