Socket
Socket
Sign inDemoInstall

@typescript-eslint/eslint-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3773
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/eslint-plugin - npm Package Compare versions

Comparing version 1.7.1-alpha.7 to 1.7.1-alpha.8

11

dist/rules/restrict-plus-operands.js

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

description: 'When adding two variables, operands must both be of type number or of type string.',
tslintRuleName: 'restrict-plus-operands',
tslintName: 'restrict-plus-operands',
category: 'Best Practices',

@@ -39,6 +39,11 @@ recommended: false,

* Helper function to get base type of node
* @param type type to be evaluated
* @returns string, number or invalid
*/
function getBaseTypeOfLiteralType(type) {
const constraint = type.getConstraint();
if (constraint &&
// for generic types with union constraints, it will return itself from getConstraint
// so we have to guard against infinite recursion...
constraint !== type) {
return getBaseTypeOfLiteralType(constraint);
}
if (type.isNumberLiteral()) {

@@ -45,0 +50,0 @@ return 'number';

{
"name": "@typescript-eslint/eslint-plugin",
"version": "1.7.1-alpha.7+92e65ec",
"version": "1.7.1-alpha.8+3f305b1",
"description": "TypeScript plugin for ESLint",

@@ -38,4 +38,4 @@ "keywords": [

"dependencies": {
"@typescript-eslint/parser": "1.7.1-alpha.7+92e65ec",
"@typescript-eslint/typescript-estree": "1.7.1-alpha.7+92e65ec",
"@typescript-eslint/parser": "1.7.1-alpha.8+3f305b1",
"@typescript-eslint/typescript-estree": "1.7.1-alpha.8+3f305b1",
"eslint-utils": "^1.3.1",

@@ -52,3 +52,3 @@ "regexpp": "^2.0.1",

},
"gitHead": "92e65ec41033df9375ecb5b5c4ebf61c4ef7e73d"
"gitHead": "3f305b16fd69304e5f1fc66cef2dfc1c3eaeb1df"
}

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